mirror of
https://github.com/PabloMK7/citra.git
synced 2025-12-14 03:08:47 +00:00
Port yuzu-emu/yuzu#11946: "Enable (Feral Interactive) Gamemode on Linux" (#7245)
This commit is contained in:
parent
2e369c03b8
commit
c7e9f8449e
14 changed files with 540 additions and 3 deletions
|
|
@ -528,6 +528,7 @@ void Config::ReadMiscellaneousValues() {
|
|||
qt_config->beginGroup(QStringLiteral("Miscellaneous"));
|
||||
|
||||
ReadBasicSetting(Settings::values.log_filter);
|
||||
ReadBasicSetting(Settings::values.enable_gamemode);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
|
@ -1044,6 +1045,7 @@ void Config::SaveMiscellaneousValues() {
|
|||
qt_config->beginGroup(QStringLiteral("Miscellaneous"));
|
||||
|
||||
WriteBasicSetting(Settings::values.log_filter);
|
||||
WriteBasicSetting(Settings::values.enable_gamemode);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
|||
ui->emulation_speed_combo->setVisible(!Settings::IsConfiguringGlobal());
|
||||
ui->screenshot_combo->setVisible(!Settings::IsConfiguringGlobal());
|
||||
ui->updateBox->setVisible(UISettings::values.updater_found);
|
||||
#ifndef __unix__
|
||||
ui->toggle_gamemode->setVisible(false);
|
||||
#endif
|
||||
|
||||
SetupPerGameUI();
|
||||
SetConfiguration();
|
||||
|
|
@ -76,6 +79,9 @@ void ConfigureGeneral::SetConfiguration() {
|
|||
ui->toggle_update_check->setChecked(
|
||||
UISettings::values.check_for_update_on_start.GetValue());
|
||||
ui->toggle_auto_update->setChecked(UISettings::values.update_on_close.GetValue());
|
||||
#ifdef __unix__
|
||||
ui->toggle_gamemode->setChecked(Settings::values.enable_gamemode.GetValue());
|
||||
#endif
|
||||
}
|
||||
|
||||
if (Settings::values.frame_limit.GetValue() == 0) {
|
||||
|
|
@ -172,6 +178,9 @@ void ConfigureGeneral::ApplyConfiguration() {
|
|||
|
||||
UISettings::values.check_for_update_on_start = ui->toggle_update_check->isChecked();
|
||||
UISettings::values.update_on_close = ui->toggle_auto_update->isChecked();
|
||||
#ifdef __unix__
|
||||
Settings::values.enable_gamemode = ui->toggle_gamemode->isChecked();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,6 +210,7 @@ void ConfigureGeneral::SetupPerGameUI() {
|
|||
ui->general_group->setVisible(false);
|
||||
ui->updateBox->setVisible(false);
|
||||
ui->button_reset_defaults->setVisible(false);
|
||||
ui->toggle_gamemode->setVisible(false);
|
||||
|
||||
ConfigurationShared::SetColoredComboBox(
|
||||
ui->region_combobox, ui->widget_region,
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggle_gamemode">
|
||||
<property name="text">
|
||||
<string>Enable Gamemode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue