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

Escape spaces when building encrypted arguments

This prevents the game from properly updating, since UserPath was
accidentally getting its spaces stripped by the launcher.
This commit is contained in:
Joshua Goins 2022-04-27 11:44:06 -04:00
parent 65dd2cc375
commit bcab12cf5f

View file

@ -71,13 +71,13 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
}
}
arguments.push_back({"UserPath", QString("C:/Users/%1/Documents/My Games/FINAL FANTASY XIV - A Realm Reborn").arg(userPath)});
arguments.push_back({"UserPath", QString(R"(C:\Users\%1\My Documents\My Games\FINAL FANTASY XIV - A Realm Reborn)").arg(userPath)});
const QString argFormat = " /%1 =%2";
QString argJoined;
for(const auto& arg : arguments) {
argJoined += argFormat.arg(arg.key, arg.value);
for(auto& arg : arguments) {
argJoined += argFormat.arg(arg.key, arg.value.replace(" ", " "));
}
QString finalArg = encryptGameArg(argJoined);