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:
parent
1430862a90
commit
65dd2cc375
2 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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, [&] {
|
||||
|
|
Loading…
Add table
Reference in a new issue