diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index 08c44a8..7871bb6 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -96,6 +96,15 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window mainLayout->addWidget(loginBox, 2, 1); + encryptArgumentsBox = new QCheckBox(); + connect(encryptArgumentsBox, &QCheckBox::stateChanged, [=](int) { + getCurrentProfile().encryptArguments = encryptArgumentsBox->isChecked(); + + this->window.reloadControls(); + this->window.saveSettings(); + }); + loginBoxLayout->addRow("Encrypt Game Arguments", encryptArgumentsBox); + serverType = new QComboBox(); serverType->insertItem(0, "Square Enix"); serverType->insertItem(1, "Sapphire"); @@ -302,6 +311,7 @@ void SettingsWindow::reloadControls() { #endif // login + encryptArgumentsBox->setChecked(profile.encryptArguments); serverType->setCurrentIndex(profile.isSapphire ? 1 : 0); lobbyServerURL->setEnabled(profile.isSapphire); lobbyServerURL->setText(profile.lobbyURL); diff --git a/src/settingswindow.h b/src/settingswindow.h index 5f7d101..453cbfb 100644 --- a/src/settingswindow.h +++ b/src/settingswindow.h @@ -39,6 +39,7 @@ private: QCheckBox* useGamescope, *useEsync, *useGamemode; // login + QCheckBox* encryptArgumentsBox = nullptr; QComboBox* serverType = nullptr; QLineEdit* lobbyServerURL = nullptr; QCheckBox* rememberUsernameBox = nullptr, *rememberPasswordBox = nullptr; diff --git a/src/xivlauncher.cpp b/src/xivlauncher.cpp index 0380a32..7847e19 100755 --- a/src/xivlauncher.cpp +++ b/src/xivlauncher.cpp @@ -142,8 +142,7 @@ void LauncherWindow::launchGame(const LoginAuth auth) { arguments.push_back(QString("DEV.LobbyHost0%1=%2 DEV.LobbyPort0%1=54994").arg(QString::number(i), auth.lobbyhost)); } - bool encryptArguments = true; - if(encryptArguments) { + if(currentProfile().encryptArguments) { auto executable = arguments[0]; arguments.removeFirst(); @@ -279,6 +278,8 @@ void LauncherWindow::readInitialInformation() { #endif } + // login + profile.encryptArguments = settings.value("encryptArguments", false).toBool(); profile.isSapphire = settings.value("isSapphire", false).toBool(); profile.lobbyURL = settings.value("lobbyURL", "").toString(); profile.rememberUsername = settings.value("rememberUsername", false).toBool(); @@ -525,6 +526,7 @@ void LauncherWindow::saveSettings() { settings.setValue("useGamemode", profile.useGamemode); // login + settings.setValue("encryptArguments", profile.encryptArguments); settings.setValue("isSapphire", profile.isSapphire); settings.setValue("lobbyURL", profile.lobbyURL); settings.setValue("rememberUsername", profile.rememberUsername); diff --git a/src/xivlauncher.h b/src/xivlauncher.h index 333b1ff..999b325 100755 --- a/src/xivlauncher.h +++ b/src/xivlauncher.h @@ -17,10 +17,12 @@ struct ProfileSettings { QUuid uuid; QString name; + // game int language = 1; // 1 is english, thats all i know QString gamePath, winePath, winePrefixPath; QString bootVersion, gameVersion; + // wine // 0 = system, 1 = custom, 2 = built-in (mac only) // TODO: yes, i know this should be an enum int wineVersion = 0; @@ -28,6 +30,8 @@ struct ProfileSettings { bool useDX9 = false; bool enableDXVKhud = false; + // login + bool encryptArguments = false; bool isSapphire = false; QString lobbyURL; bool rememberUsername = false, rememberPassword = false;