1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00

Make Astra actually close when the game launches, if you request it to

This option was completely broken, as the window would close even if you
didn't want it to, and the launcher would never exit. Now this option
actually does what it's supposed to.
This commit is contained in:
Joshua Goins 2022-04-17 22:53:39 -04:00
parent 1430862a90
commit 65dd2cc375
2 changed files with 6 additions and 1 deletions

View file

@ -181,6 +181,10 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au
socket->listen(QHostAddress::Any, 5248);
}
connect(gameProcess, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, [this](int code, QProcess::ExitStatus status) {
gameClosed();
});
launchGameExecutable(profile, gameProcess, arguments);
successfulLaunch();

View file

@ -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, [&] {