mirror of
https://github.com/redstrate/Astra.git
synced 2025-06-08 06:57:46 +00:00
Only launch Dalamud once and if a pid is found
This commit is contained in:
parent
8055a791d7
commit
ada56f7212
1 changed files with 8 additions and 1 deletions
|
@ -153,15 +153,22 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au
|
||||||
gameArgs.push_back({"IsSteam", "1"});
|
gameArgs.push_back({"IsSteam", "1"});
|
||||||
gameProcess->environment() << "IS_FFXIV_LAUNCH_FROM_STEAM=1";
|
gameProcess->environment() << "IS_FFXIV_LAUNCH_FROM_STEAM=1";
|
||||||
}
|
}
|
||||||
|
gameProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||||
|
|
||||||
if(profile.enableDalamud) {
|
if(profile.enableDalamud) {
|
||||||
connect(gameProcess, &QProcess::readyReadStandardOutput, [this, gameProcess, profile] {
|
connect(gameProcess, &QProcess::readyReadStandardOutput, [this, gameProcess, profile] {
|
||||||
QString output = gameProcess->readAllStandardOutput();
|
QString output = gameProcess->readAllStandardOutput();
|
||||||
|
bool success;
|
||||||
|
int dec = output.toInt(&success, 10);
|
||||||
|
if(!success)
|
||||||
|
return;
|
||||||
|
|
||||||
|
qDebug() << "got output: " << output;
|
||||||
|
|
||||||
qDebug() << "Now launching dalamud...";
|
qDebug() << "Now launching dalamud...";
|
||||||
|
|
||||||
auto dalamudProcess = new QProcess();
|
auto dalamudProcess = new QProcess();
|
||||||
dalamudProcess->setProcessChannelMode(QProcess::ForwardedChannels);
|
dalamudProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||||
|
|
||||||
QStringList dalamudEnv = gameProcess->environment();
|
QStringList dalamudEnv = gameProcess->environment();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue