mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
Add setting to enable DXVK hud
This commit is contained in:
parent
7456f160e4
commit
c807b8ddcd
3 changed files with 33 additions and 18 deletions
|
@ -31,19 +31,31 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
||||||
this->window.useDX9 = directXCombo->currentIndex() == 1;
|
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"
|
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
|
||||||
"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)
|
|
||||||
auto wineBox = new QGroupBox("Wine Options");
|
auto wineBox = new QGroupBox("Wine Options");
|
||||||
auto wineBoxLayout = new QFormLayout();
|
auto wineBoxLayout = new QFormLayout();
|
||||||
wineBox->setLayout(wineBoxLayout);
|
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);
|
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<bool>(state));
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC)
|
||||||
auto useSystemWine = new QCheckBox("Use System Wine");
|
auto useSystemWine = new QCheckBox("Use System Wine");
|
||||||
useSystemWine->setChecked(window.settings.value("useSystemWine", false).toBool());
|
useSystemWine->setChecked(window.useSystemWine);
|
||||||
wineBoxLayout->addWidget(useSystemWine);
|
wineBoxLayout->addWidget(useSystemWine);
|
||||||
|
|
||||||
connect(useSystemWine, &QCheckBox::stateChanged, [this](int state) {
|
connect(useSystemWine, &QCheckBox::stateChanged, [this](int state) {
|
||||||
|
@ -61,14 +73,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#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");
|
auto useEsync = new QCheckBox("Use Esync");
|
||||||
useEsync->setChecked(window.settings.value("useEsync", false).toBool());
|
useEsync->setChecked(window.useEsync);
|
||||||
wineBoxLayout->addWidget(useEsync);
|
wineBoxLayout->addWidget(useEsync);
|
||||||
|
|
||||||
auto esyncLabel = new QLabel("Improves general game performance, but requires a Wine built with the Esync patches.\n"
|
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");
|
auto useGamescope = new QCheckBox("Use Gamescope");
|
||||||
useGamescope->setChecked(window.settings.value("useGamescope", false).toBool());
|
useGamescope->setChecked(window.useGamescope);
|
||||||
wineBoxLayout->addWidget( useGamescope);
|
wineBoxLayout->addWidget(useGamescope);
|
||||||
|
|
||||||
auto gamescopeLabel = new QLabel("Use the SteamOS compositor that uses Wayland.\n"
|
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.");
|
"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");
|
auto useGamemode = new QCheckBox("Use Gamemode");
|
||||||
useGamemode->setChecked(window.settings.value("useGamemode", false).toBool());
|
useGamemode->setChecked(window.useGamemode);
|
||||||
wineBoxLayout->addWidget(useGamemode);
|
wineBoxLayout->addWidget(useGamemode);
|
||||||
|
|
||||||
auto gamemodeLabel = new QLabel("Use Feral Interactive's GameMode, which applies a couple of performance enhancements.\n"
|
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.useGamemode = state;
|
||||||
this->window.settings.setValue("useGamemode", static_cast<bool>(state));
|
this->window.settings.setValue("useGamemode", static_cast<bool>(state));
|
||||||
});
|
});
|
||||||
|
|
||||||
layout->addRow(wineBox);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto currentGameDirectory = new QLabel(window.gamePath);
|
auto currentGameDirectory = new QLabel(window.gamePath);
|
||||||
|
|
|
@ -82,6 +82,13 @@ void LauncherWindow::launchExecutable(const QStringList args) {
|
||||||
} else {
|
} else {
|
||||||
arguments.push_back("/Applications/FINAL FANTASY XIV ONLINE.app/Contents/SharedSupport/finalfantasyxiv/FINAL FANTASY XIV ONLINE/wine");
|
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
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
|
@ -143,6 +150,7 @@ void LauncherWindow::readInitialInformation() {
|
||||||
useGamemode = settings.value("useGamemode", false).toBool();
|
useGamemode = settings.value("useGamemode", false).toBool();
|
||||||
useGamescope = settings.value("useGamescope", false).toBool();
|
useGamescope = settings.value("useGamescope", false).toBool();
|
||||||
useSystemWine = settings.value("useSystemWine", false).toBool();
|
useSystemWine = settings.value("useSystemWine", false).toBool();
|
||||||
|
enableDXVKhud = settings.value("enableDXVKhud", false).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
LauncherWindow::LauncherWindow(QWidget* parent) :
|
LauncherWindow::LauncherWindow(QWidget* parent) :
|
||||||
|
@ -274,6 +282,8 @@ LauncherWindow::LauncherWindow(QWidget* parent) :
|
||||||
|
|
||||||
readInitialInformation();
|
readInitialInformation();
|
||||||
|
|
||||||
|
launchExecutable({gamePath + "/game/ffxiv_dx11.exe", "DEV.TestSID=xxxx"});
|
||||||
|
|
||||||
connect(loginButton, &QPushButton::released, [=] {
|
connect(loginButton, &QPushButton::released, [=] {
|
||||||
auto info = LoginInformation{usernameEdit->text(), passwordEdit->text(), otpEdit->text()};
|
auto info = LoginInformation{usernameEdit->text(), passwordEdit->text(), otpEdit->text()};
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ public:
|
||||||
bool useEsync, useGamescope, useGamemode;
|
bool useEsync, useGamescope, useGamemode;
|
||||||
bool useDX9 = false;
|
bool useDX9 = false;
|
||||||
bool useSystemWine = false;
|
bool useSystemWine = false;
|
||||||
|
bool enableDXVKhud = false;
|
||||||
|
|
||||||
void launchGame(const LoginAuth auth);
|
void launchGame(const LoginAuth auth);
|
||||||
void launchExecutable(const QStringList args);
|
void launchExecutable(const QStringList args);
|
||||||
|
|
Loading…
Add table
Reference in a new issue