mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 04:57:44 +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
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
auto useEsync = new QCheckBox("Use Esync");
|
useEsync = new QCheckBox("Use Esync");
|
||||||
useEsync->setChecked(window.currentProfile().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"
|
||||||
|
@ -218,12 +217,12 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
||||||
wineBoxLayout->addWidget(esyncLabel);
|
wineBoxLayout->addWidget(esyncLabel);
|
||||||
|
|
||||||
connect(useEsync, &QCheckBox::stateChanged, [this](int state) {
|
connect(useEsync, &QCheckBox::stateChanged, [this](int state) {
|
||||||
this->window.currentProfile().useEsync = state;
|
getCurrentProfile().useEsync = state;
|
||||||
this->window.settings.setValue("useEsync", static_cast<bool>(state));
|
|
||||||
|
this->window.saveSettings();
|
||||||
});
|
});
|
||||||
|
|
||||||
auto useGamescope = new QCheckBox("Use Gamescope");
|
useGamescope = new QCheckBox("Use Gamescope");
|
||||||
useGamescope->setChecked(window.currentProfile().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"
|
||||||
|
@ -232,12 +231,12 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
||||||
wineBoxLayout->addWidget(gamescopeLabel);
|
wineBoxLayout->addWidget(gamescopeLabel);
|
||||||
|
|
||||||
connect(useGamescope, &QCheckBox::stateChanged, [this](int state) {
|
connect(useGamescope, &QCheckBox::stateChanged, [this](int state) {
|
||||||
this->window.currentProfile().useGamescope = state;
|
getCurrentProfile().useGamescope = state;
|
||||||
this->window.settings.setValue("useGamescope", static_cast<bool>(state));
|
|
||||||
|
this->window.saveSettings();
|
||||||
});
|
});
|
||||||
|
|
||||||
auto useGamemode = new QCheckBox("Use Gamemode");
|
useGamemode = new QCheckBox("Use Gamemode");
|
||||||
useGamemode->setChecked(window.currentProfile().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"
|
||||||
|
@ -246,8 +245,9 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
||||||
wineBoxLayout->addWidget(gamemodeLabel);
|
wineBoxLayout->addWidget(gamemodeLabel);
|
||||||
|
|
||||||
connect(useGamemode, &QCheckBox::stateChanged, [this](int state) {
|
connect(useGamemode, &QCheckBox::stateChanged, [this](int state) {
|
||||||
this->window.currentProfile().useGamemode = state;
|
getCurrentProfile().useGamemode = state;
|
||||||
this->window.settings.setValue("useGamemode", static_cast<bool>(state));
|
|
||||||
|
this->window.saveSettings();
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -282,6 +282,10 @@ void SettingsWindow::reloadControls() {
|
||||||
winePathLabel->setText(profile.winePath);
|
winePathLabel->setText(profile.winePath);
|
||||||
winePrefixDirectory->setText(profile.winePrefixPath);
|
winePrefixDirectory->setText(profile.winePrefixPath);
|
||||||
|
|
||||||
|
useEsync->setChecked(profile.useEsync);
|
||||||
|
useGamescope->setChecked(profile.useGamescope);
|
||||||
|
useGamemode->setChecked(profile.useGamemode);
|
||||||
|
|
||||||
// login
|
// login
|
||||||
serverType->setCurrentIndex(profile.isSapphire ? 1 : 0);
|
serverType->setCurrentIndex(profile.isSapphire ? 1 : 0);
|
||||||
lobbyServerURL->setText(profile.lobbyURL);
|
lobbyServerURL->setText(profile.lobbyURL);
|
||||||
|
|
|
@ -35,6 +35,8 @@ private:
|
||||||
QLabel* winePathLabel;
|
QLabel* winePathLabel;
|
||||||
QLabel* winePrefixDirectory;
|
QLabel* winePrefixDirectory;
|
||||||
|
|
||||||
|
QCheckBox* useGamescope, *useEsync, *useGamemode;
|
||||||
|
|
||||||
// login
|
// login
|
||||||
QComboBox* serverType = nullptr;
|
QComboBox* serverType = nullptr;
|
||||||
QLineEdit* lobbyServerURL = nullptr;
|
QLineEdit* lobbyServerURL = nullptr;
|
||||||
|
|
|
@ -394,6 +394,10 @@ void LauncherWindow::saveSettings() {
|
||||||
settings.setValue("winePath", profile.winePath);
|
settings.setValue("winePath", profile.winePath);
|
||||||
settings.setValue("winePrefixPath", profile.winePrefixPath);
|
settings.setValue("winePrefixPath", profile.winePrefixPath);
|
||||||
|
|
||||||
|
settings.setValue("useEsync", profile.useEsync);
|
||||||
|
settings.setValue("useGamescope", profile.useGamescope);
|
||||||
|
settings.setValue("useGamemode", profile.useGamemode);
|
||||||
|
|
||||||
// login
|
// login
|
||||||
settings.setValue("isSapphire", profile.isSapphire);
|
settings.setValue("isSapphire", profile.isSapphire);
|
||||||
settings.setValue("lobbyURL", profile.lobbyURL);
|
settings.setValue("lobbyURL", profile.lobbyURL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue