mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 20:47:45 +00:00
Make misc linux wine options functional too
This commit is contained in:
parent
c88d5436f9
commit
dfb4afb12e
3 changed files with 22 additions and 12 deletions
|
@ -208,8 +208,7 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
|||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
auto useEsync = new QCheckBox("Use Esync");
|
||||
useEsync->setChecked(window.currentProfile().useEsync);
|
||||
useEsync = new QCheckBox("Use Esync");
|
||||
wineBoxLayout->addWidget(useEsync);
|
||||
|
||||
auto esyncLabel = new QLabel("Improves general game performance, but requires a Wine built with the Esync patches.\n"
|
||||
|
@ -218,12 +217,12 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
|||
wineBoxLayout->addWidget(esyncLabel);
|
||||
|
||||
connect(useEsync, &QCheckBox::stateChanged, [this](int state) {
|
||||
this->window.currentProfile().useEsync = state;
|
||||
this->window.settings.setValue("useEsync", static_cast<bool>(state));
|
||||
getCurrentProfile().useEsync = state;
|
||||
|
||||
this->window.saveSettings();
|
||||
});
|
||||
|
||||
auto useGamescope = new QCheckBox("Use Gamescope");
|
||||
useGamescope->setChecked(window.currentProfile().useGamescope);
|
||||
useGamescope = new QCheckBox("Use Gamescope");
|
||||
wineBoxLayout->addWidget(useGamescope);
|
||||
|
||||
auto gamescopeLabel = new QLabel("Use the SteamOS compositor that uses Wayland.\n"
|
||||
|
@ -232,12 +231,12 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
|||
wineBoxLayout->addWidget(gamescopeLabel);
|
||||
|
||||
connect(useGamescope, &QCheckBox::stateChanged, [this](int state) {
|
||||
this->window.currentProfile().useGamescope = state;
|
||||
this->window.settings.setValue("useGamescope", static_cast<bool>(state));
|
||||
getCurrentProfile().useGamescope = state;
|
||||
|
||||
this->window.saveSettings();
|
||||
});
|
||||
|
||||
auto useGamemode = new QCheckBox("Use Gamemode");
|
||||
useGamemode->setChecked(window.currentProfile().useGamemode);
|
||||
useGamemode = new QCheckBox("Use Gamemode");
|
||||
wineBoxLayout->addWidget(useGamemode);
|
||||
|
||||
auto gamemodeLabel = new QLabel("Use Feral Interactive's GameMode, which applies a couple of performance enhancements.\n"
|
||||
|
@ -246,8 +245,9 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
|||
wineBoxLayout->addWidget(gamemodeLabel);
|
||||
|
||||
connect(useGamemode, &QCheckBox::stateChanged, [this](int state) {
|
||||
this->window.currentProfile().useGamemode = state;
|
||||
this->window.settings.setValue("useGamemode", static_cast<bool>(state));
|
||||
getCurrentProfile().useGamemode = state;
|
||||
|
||||
this->window.saveSettings();
|
||||
});
|
||||
#endif
|
||||
|
||||
|
@ -282,6 +282,10 @@ void SettingsWindow::reloadControls() {
|
|||
winePathLabel->setText(profile.winePath);
|
||||
winePrefixDirectory->setText(profile.winePrefixPath);
|
||||
|
||||
useEsync->setChecked(profile.useEsync);
|
||||
useGamescope->setChecked(profile.useGamescope);
|
||||
useGamemode->setChecked(profile.useGamemode);
|
||||
|
||||
// login
|
||||
serverType->setCurrentIndex(profile.isSapphire ? 1 : 0);
|
||||
lobbyServerURL->setText(profile.lobbyURL);
|
||||
|
|
|
@ -35,6 +35,8 @@ private:
|
|||
QLabel* winePathLabel;
|
||||
QLabel* winePrefixDirectory;
|
||||
|
||||
QCheckBox* useGamescope, *useEsync, *useGamemode;
|
||||
|
||||
// login
|
||||
QComboBox* serverType = nullptr;
|
||||
QLineEdit* lobbyServerURL = nullptr;
|
||||
|
|
|
@ -394,6 +394,10 @@ void LauncherWindow::saveSettings() {
|
|||
settings.setValue("winePath", profile.winePath);
|
||||
settings.setValue("winePrefixPath", profile.winePrefixPath);
|
||||
|
||||
settings.setValue("useEsync", profile.useEsync);
|
||||
settings.setValue("useGamescope", profile.useGamescope);
|
||||
settings.setValue("useGamemode", profile.useGamemode);
|
||||
|
||||
// login
|
||||
settings.setValue("isSapphire", profile.isSapphire);
|
||||
settings.setValue("lobbyURL", profile.lobbyURL);
|
||||
|
|
Loading…
Add table
Reference in a new issue