From a88f7305d0a7f39c60b56cdee9bdc01cdbf451c9 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 27 Jan 2022 11:02:57 -0500 Subject: [PATCH] Fix unencrypted game args not working when Dalamud is enabled --- src/launchercore.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/launchercore.cpp b/src/launchercore.cpp index 4282ffd..c92ca4c 100755 --- a/src/launchercore.cpp +++ b/src/launchercore.cpp @@ -183,8 +183,19 @@ void LauncherCore::launchGame(const ProfileSettings& profile, const LoginAuth au arguments.append(earg); launchExecutable(profile, gameProcess, arguments); } else { - for(auto arg : gameArgs) { - arguments.push_back(QString(" %1=%2").arg(arg.key, arg.value)); + if(profile.enableDalamud) { + // nativelauncher requires arg[3] to be the arguments, put inside of a quoted string. if this is encrypted, that's easy but this is not + // TODO: combine with code above (they do the same thing lol) + QString finalArg; + for(auto arg : gameArgs) { + finalArg.append(QString(" %1=%2").arg(arg.key, arg.value)); + } + + arguments.append(finalArg); + } else { + for(auto arg : gameArgs) { + arguments.append(QString("%1=%2").arg(arg.key, arg.value)); + } } launchExecutable(profile, gameProcess, arguments);