diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index cca6ee0..2803f97 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -31,19 +31,31 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window this->window.useDX9 = directXCombo->currentIndex() == 1; }); - auto infoLabel = new QLabel("This is a list of possible enhancements you can make to your Wine gaming experience.\n" - "This is all stuff you can do outside of the launcher, but we can take care of it for you."); - infoLabel->setWordWrap(true); - -#if defined(Q_OS_MAC) +#if defined(Q_OS_MAC) || defined(Q_OS_LINUX) auto wineBox = new QGroupBox("Wine Options"); auto wineBoxLayout = new QFormLayout(); wineBox->setLayout(wineBoxLayout); + layout->addRow(wineBox); + + auto infoLabel = new QLabel("This is a list of possible enhancements you can make to your Wine gaming experience.\n" + "This is all stuff you can do outside of the launcher, but we can take care of it for you."); + infoLabel->setWordWrap(true); wineBoxLayout->addWidget(infoLabel); + auto enableDXVKhud = new QCheckBox("Enable DXVK HUD"); + enableDXVKhud->setChecked(window.enableDXVKhud); + wineBoxLayout->addWidget(enableDXVKhud); + + connect(enableDXVKhud, &QCheckBox::stateChanged, [this](int state) { + this->window.enableDXVKhud = state; + this->window.settings.setValue("enableDXVKhud", static_cast(state)); + }); +#endif + +#if defined(Q_OS_MAC) auto useSystemWine = new QCheckBox("Use System Wine"); - useSystemWine->setChecked(window.settings.value("useSystemWine", false).toBool()); + useSystemWine->setChecked(window.useSystemWine); wineBoxLayout->addWidget(useSystemWine); connect(useSystemWine, &QCheckBox::stateChanged, [this](int state) { @@ -61,14 +73,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window #endif #if defined(Q_OS_LINUX) - auto wineBox = new QGroupBox("Wine Options"); - auto wineBoxLayout = new QFormLayout(); - wineBox->setLayout(wineBoxLayout); - - wineBoxLayout->addWidget(infoLabel); - auto useEsync = new QCheckBox("Use Esync"); - useEsync->setChecked(window.settings.value("useEsync", false).toBool()); + useEsync->setChecked(window.useEsync); wineBoxLayout->addWidget(useEsync); auto esyncLabel = new QLabel("Improves general game performance, but requires a Wine built with the Esync patches.\n" @@ -82,8 +88,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window }); auto useGamescope = new QCheckBox("Use Gamescope"); - useGamescope->setChecked(window.settings.value("useGamescope", false).toBool()); - wineBoxLayout->addWidget( useGamescope); + useGamescope->setChecked(window.useGamescope); + wineBoxLayout->addWidget(useGamescope); auto gamescopeLabel = new QLabel("Use the SteamOS compositor that uses Wayland.\n" "If you are experiencing input issues on XWayland, try this option if you have it installed."); @@ -96,7 +102,7 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window }); auto useGamemode = new QCheckBox("Use Gamemode"); - useGamemode->setChecked(window.settings.value("useGamemode", false).toBool()); + useGamemode->setChecked(window.useGamemode); wineBoxLayout->addWidget(useGamemode); auto gamemodeLabel = new QLabel("Use Feral Interactive's GameMode, which applies a couple of performance enhancements.\n" @@ -108,8 +114,6 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window this->window.useGamemode = state; this->window.settings.setValue("useGamemode", static_cast(state)); }); - - layout->addRow(wineBox); #endif auto currentGameDirectory = new QLabel(window.gamePath); diff --git a/src/xivlauncher.cpp b/src/xivlauncher.cpp index f61ee46..87bbc3e 100755 --- a/src/xivlauncher.cpp +++ b/src/xivlauncher.cpp @@ -82,6 +82,13 @@ void LauncherWindow::launchExecutable(const QStringList args) { } else { arguments.push_back("/Applications/FINAL FANTASY XIV ONLINE.app/Contents/SharedSupport/finalfantasyxiv/FINAL FANTASY XIV ONLINE/wine"); } + + QStringList env = QProcess::systemEnvironment(); + + if(enableDXVKhud) + env << "DXVK_HUD=full"; + + process->setEnvironment(env); #endif #if defined(Q_OS_LINUX) @@ -143,6 +150,7 @@ void LauncherWindow::readInitialInformation() { useGamemode = settings.value("useGamemode", false).toBool(); useGamescope = settings.value("useGamescope", false).toBool(); useSystemWine = settings.value("useSystemWine", false).toBool(); + enableDXVKhud = settings.value("enableDXVKhud", false).toBool(); } LauncherWindow::LauncherWindow(QWidget* parent) : @@ -274,6 +282,8 @@ LauncherWindow::LauncherWindow(QWidget* parent) : readInitialInformation(); + launchExecutable({gamePath + "/game/ffxiv_dx11.exe", "DEV.TestSID=xxxx"}); + connect(loginButton, &QPushButton::released, [=] { auto info = LoginInformation{usernameEdit->text(), passwordEdit->text(), otpEdit->text()}; diff --git a/src/xivlauncher.h b/src/xivlauncher.h index 015d0ad..e42a751 100755 --- a/src/xivlauncher.h +++ b/src/xivlauncher.h @@ -38,6 +38,7 @@ public: bool useEsync, useGamescope, useGamemode; bool useDX9 = false; bool useSystemWine = false; + bool enableDXVKhud = false; void launchGame(const LoginAuth auth); void launchExecutable(const QStringList args);