diff --git a/src/launchercore.cpp b/src/launchercore.cpp index 5f8d0b4..118553c 100755 --- a/src/launchercore.cpp +++ b/src/launchercore.cpp @@ -188,6 +188,15 @@ void LauncherCore::launchExecutable(const ProfileSettings& profile, const QStrin void LauncherCore::launchGameExecutable(const ProfileSettings& profile, QProcess* process, const QStringList args) { QList arguments; + arguments.append(args); + + launchExecutable(profile, process, arguments); +} + +void LauncherCore::launchExecutable(const ProfileSettings& profile, QProcess* process, const QStringList args) { + QList arguments; + auto env = process->processEnvironment(); + #if defined(Q_OS_LINUX) if(profile.useGamescope) { arguments.push_back("gamescope"); @@ -198,13 +207,13 @@ void LauncherCore::launchGameExecutable(const ProfileSettings& profile, QProcess if(profile.gamescope.borderless) arguments.push_back("-b"); - if(profile.gamescope.width >= 0) + if(profile.gamescope.width > 0) arguments.push_back("-w " + QString::number(profile.gamescope.width)); - if(profile.gamescope.height >= 0) + if(profile.gamescope.height > 0) arguments.push_back("-h " + QString::number(profile.gamescope.height)); - if(profile.gamescope.refreshRate >= 0) + if(profile.gamescope.refreshRate > 0) arguments.push_back("-r " + QString::number(profile.gamescope.refreshRate)); } @@ -212,15 +221,6 @@ void LauncherCore::launchGameExecutable(const ProfileSettings& profile, QProcess arguments.push_back("gamemoderun"); #endif - arguments.append(args); - - launchExecutable(profile, process, args); -} - -void LauncherCore::launchExecutable(const ProfileSettings& profile, QProcess* process, const QStringList args) { - QList arguments; - auto env = process->processEnvironment(); - #if defined(Q_OS_LINUX) if(profile.useEsync) { env.insert("WINEESYNC", QString::number(1));