diff options
| author | dada513 <dada513@protonmail.com> | 2022-03-28 20:55:06 +0200 |
|---|---|---|
| committer | dada513 <dada513@protonmail.com> | 2022-03-28 20:55:06 +0200 |
| commit | 341eb16a4c0571cc66068c0bdd85d8d8955869b7 (patch) | |
| tree | a2214b34b0b6a49add241d044aaeda5151396733 /launcher/minecraft | |
| parent | 3a7eeff135f92c807fdc066cb06d835f295b66d3 (diff) | |
| parent | 87cf38a3770dd7f55fbae79ca3a4958155289af7 (diff) | |
| download | PrismLauncher-341eb16a4c0571cc66068c0bdd85d8d8955869b7.tar.gz PrismLauncher-341eb16a4c0571cc66068c0bdd85d8d8955869b7.tar.bz2 PrismLauncher-341eb16a4c0571cc66068c0bdd85d8d8955869b7.zip | |
Merge branch 'develop' of https://github.com/PolyMC/PolyMC into flatpak_properly
Diffstat (limited to 'launcher/minecraft')
| -rw-r--r-- | launcher/minecraft/MinecraftInstance.cpp | 6 | ||||
| -rw-r--r-- | launcher/minecraft/launch/LauncherPartLaunch.cpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 6db12c42..90bb92a1 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -20,6 +20,7 @@ #include "launch/steps/PreLaunchCommand.h" #include "launch/steps/TextPrint.h" #include "launch/steps/CheckJava.h" +#include "launch/steps/QuitAfterGameStop.h" #include "minecraft/launch/LauncherPartLaunch.h" #include "minecraft/launch/DirectJavaLaunch.h" @@ -935,6 +936,11 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt { process->setCensorFilter(createCensorFilterFromSession(session)); } + if(APPLICATION->settings()->get("QuitAfterGameStop").toBool()) + { + auto step = new QuitAfterGameStop(pptr); + process->appendStep(step); + } m_launchProcess = process; emit launchTaskChanged(m_launchProcess); return m_launchProcess; diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp index d15d7e9d..173f29b5 100644 --- a/launcher/minecraft/launch/LauncherPartLaunch.cpp +++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp @@ -170,6 +170,7 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state) { if (APPLICATION->settings()->get("CloseAfterLaunch").toBool()) APPLICATION->showMainWindow(); + m_parent->setPid(-1); // if the exit code wasn't 0, report this as a crash auto exitCode = m_process.exitCode(); |
