1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-06-07 22:47:46 +00:00

Only launch Dalamud once and if a pid is found

This commit is contained in:
Joshua Goins 2022-02-23 17:14:10 -05:00
parent 8055a791d7
commit ada56f7212

View file

@ -153,15 +153,22 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au
gameArgs.push_back({"IsSteam", "1"});
gameProcess->environment() << "IS_FFXIV_LAUNCH_FROM_STEAM=1";
}
gameProcess->setProcessChannelMode(QProcess::MergedChannels);
if(profile.enableDalamud) {
connect(gameProcess, &QProcess::readyReadStandardOutput, [this, gameProcess, profile] {
QString output = gameProcess->readAllStandardOutput();
bool success;
int dec = output.toInt(&success, 10);
if(!success)
return;
qDebug() << "got output: " << output;
qDebug() << "Now launching dalamud...";
auto dalamudProcess = new QProcess();
dalamudProcess->setProcessChannelMode(QProcess::ForwardedChannels);
dalamudProcess->setProcessChannelMode(QProcess::MergedChannels);
QStringList dalamudEnv = gameProcess->environment();