mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 12:57:45 +00:00
Close and hide launcher window if requested
This commit is contained in:
parent
0658dd9a3e
commit
061a6776db
2 changed files with 16 additions and 0 deletions
|
@ -86,6 +86,10 @@ void LauncherCore::beginVanillaGame(const QString &gameExecutablePath, const Pro
|
|||
{
|
||||
auto gameProcess = new QProcess(this);
|
||||
gameProcess->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
||||
connect(gameProcess, qOverload<int>(&QProcess::finished), this, [this](int exitCode) {
|
||||
Q_UNUSED(exitCode)
|
||||
Q_EMIT gameClosed();
|
||||
});
|
||||
|
||||
auto args = getGameArgs(profile, auth);
|
||||
|
||||
|
@ -101,6 +105,10 @@ void LauncherCore::beginDalamudGame(const QString &gameExecutablePath, const Pro
|
|||
dataDir = "Z:" + dataDir.replace('/', '\\');
|
||||
|
||||
auto dalamudProcess = new QProcess(this);
|
||||
connect(dalamudProcess, qOverload<int>(&QProcess::finished), this, [this](int exitCode) {
|
||||
Q_UNUSED(exitCode)
|
||||
Q_EMIT gameClosed();
|
||||
});
|
||||
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("DALAMUD_RUNTIME", dataDir + "\\DalamudRuntime");
|
||||
|
|
|
@ -54,6 +54,14 @@ Kirigami.ApplicationWindow {
|
|||
function onLoadingFinished() {
|
||||
checkSetup()
|
||||
}
|
||||
|
||||
function onSuccessfulLaunch() {
|
||||
hide()
|
||||
}
|
||||
|
||||
function onGameClosed() {
|
||||
Qt.callLater(Qt.quit)
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: checkSetup()
|
||||
|
|
Loading…
Add table
Reference in a new issue