diff --git a/src/launchercore.cpp b/src/launchercore.cpp index 4c161ca..50d3ad4 100755 --- a/src/launchercore.cpp +++ b/src/launchercore.cpp @@ -181,6 +181,10 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au socket->listen(QHostAddress::Any, 5248); } + connect(gameProcess, qOverload(&QProcess::finished), this, [this](int code, QProcess::ExitStatus status) { + gameClosed(); + }); + launchGameExecutable(profile, gameProcess, arguments); successfulLaunch(); diff --git a/src/launcherwindow.cpp b/src/launcherwindow.cpp index 8c676d4..94ce81d 100644 --- a/src/launcherwindow.cpp +++ b/src/launcherwindow.cpp @@ -288,7 +288,8 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo }); connect(&core, &LauncherCore::successfulLaunch, [&] { - hide(); + if(core.appSettings.closeWhenLaunched) + hide(); }); connect(&core, &LauncherCore::gameClosed, [&] {