mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Support for launching from command line in offline mode
This allows launching an offline instance with --offline --name=OfflineName. This is useful for playing split screen by creating two side-by-side instances, which is impossible online, unless one is using two separate paid accounts. With this PR, it makes it possible to launch from a script - otherwise, one has to launch manually, which is a pain, or create offline profiles for each instance, which interferes with some functionality like skins (my autistic son takes great issue with his skin not being visible, when using offline profiles!). Implementation is based on MultiMC, which supports this feature. See also https://github.com/PrismLauncher/PrismLauncher/issues/1059 for discussion. Signed-off-by: Michael Tyson <michael@atastypixel.com>
This commit is contained in:
@ -56,6 +56,8 @@ class LaunchController : public Task {
|
||||
|
||||
void setOnline(bool online) { m_online = online; }
|
||||
|
||||
void setOfflineName(const QString &offlineName) { m_offlineName = offlineName; }
|
||||
|
||||
void setDemo(bool demo) { m_demo = demo; }
|
||||
|
||||
void setProfiler(BaseProfilerFactory* profiler) { m_profiler = profiler; }
|
||||
@ -88,6 +90,7 @@ class LaunchController : public Task {
|
||||
private:
|
||||
BaseProfilerFactory* m_profiler = nullptr;
|
||||
bool m_online = true;
|
||||
QString m_offlineName;
|
||||
bool m_demo = false;
|
||||
InstancePtr m_instance;
|
||||
QWidget* m_parentWidget = nullptr;
|
||||
|
Reference in New Issue
Block a user