Add quit launcher after game stops option (Steam Deck)

lecense
This commit is contained in:
dada513
2022-03-23 19:06:17 +01:00
parent c7fdfb8116
commit b1af689546
8 changed files with 83 additions and 0 deletions

View File

@ -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;