diff --git a/src/core/settings.cpp b/src/core/settings.cpp index eccfd576f..723667b91 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -168,6 +168,7 @@ void Settings::Load(SettingsInterface& si) create_save_state_backups = si.GetBoolValue("Main", "CreateSaveStateBackups", true); confim_power_off = si.GetBoolValue("Main", "ConfirmPowerOff", true); load_devices_from_save_states = si.GetBoolValue("Main", "LoadDevicesFromSaveStates", false); + apply_compatibility_settings = si.GetBoolValue("Main", "ApplyCompatibilitySettings", true); apply_game_settings = si.GetBoolValue("Main", "ApplyGameSettings", true); auto_load_cheats = si.GetBoolValue("Main", "AutoLoadCheats", true); disable_all_enhancements = si.GetBoolValue("Main", "DisableAllEnhancements", false); @@ -385,6 +386,7 @@ void Settings::Save(SettingsInterface& si) const si.SetBoolValue("Main", "CreateSaveStateBackups", create_save_state_backups); si.SetBoolValue("Main", "ConfirmPowerOff", confim_power_off); si.SetBoolValue("Main", "LoadDevicesFromSaveStates", load_devices_from_save_states); + si.SetBoolValue("Main", "ApplyCompatibilitySettings", apply_compatibility_settings); si.SetBoolValue("Main", "ApplyGameSettings", apply_game_settings); si.SetBoolValue("Main", "AutoLoadCheats", auto_load_cheats); si.SetBoolValue("Main", "DisableAllEnhancements", disable_all_enhancements); diff --git a/src/core/settings.h b/src/core/settings.h index 325ee22c5..244a07d05 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -70,6 +70,7 @@ struct Settings bool create_save_state_backups = false; bool confim_power_off = true; bool load_devices_from_save_states = false; + bool apply_compatibility_settings = true; bool apply_game_settings = true; bool auto_load_cheats = true; bool disable_all_enhancements = false; diff --git a/src/core/system.cpp b/src/core/system.cpp index 941718279..b92eb0c16 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -825,7 +825,7 @@ void System::LoadSettings(bool display_osd_messages) Host::LoadSettings(si, lock); // apply compatibility settings - if (g_settings.apply_game_settings && !s_running_game_code.empty()) + if (g_settings.apply_compatibility_settings && !s_running_game_code.empty()) { const GameDatabase::Entry* entry = GameDatabase::GetEntryForSerial(s_running_game_code); if (entry) @@ -848,6 +848,14 @@ void System::ApplySettings(bool display_osd_messages) const Settings old_config(std::move(g_settings)); g_settings = Settings(); LoadSettings(display_osd_messages); + + // If we've disabled/enabled game settings, we need to reload without it. + if (g_settings.apply_game_settings != old_config.apply_game_settings) + { + UpdateGameSettingsLayer(); + LoadSettings(display_osd_messages); + } + CheckForSettingsChanges(old_config); Host::CheckForSettingsChanges(old_config); @@ -867,7 +875,7 @@ bool System::ReloadGameSettings(bool display_osd_messages) bool System::UpdateGameSettingsLayer() { std::unique_ptr new_interface; - if (!s_running_game_code.empty()) + if (g_settings.apply_game_settings && !s_running_game_code.empty()) { std::string filename(GetGameSettingsPath(s_running_game_code)); if (FileSystem::FileExists(filename.c_str())) diff --git a/src/duckstation-qt/advancedsettingswidget.cpp b/src/duckstation-qt/advancedsettingswidget.cpp index 678c6a8fc..e1b7e5aec 100644 --- a/src/duckstation-qt/advancedsettingswidget.cpp +++ b/src/duckstation-qt/advancedsettingswidget.cpp @@ -201,10 +201,12 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Disable All Enhancements"), "Main", "DisableAllEnhancements", false); - addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Show Status Indicators"), "Display", "ShowStatusIndicators", - true); addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Show Enhancement Settings"), "Display", "ShowEnhancements", false); + addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Show Status Indicators"), "Display", "ShowStatusIndicators", + true); + addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Apply Compatibility Settings"), "Main", + "ApplyCompatibilitySettings", true); addIntRangeTweakOption(dialog, m_ui.tweakOptionTable, tr("Display FPS Limit"), "Display", "MaxFPS", 0, 1000, 0); addMSAATweakOption(dialog, m_ui.tweakOptionTable, tr("Multisample Antialiasing")); @@ -281,8 +283,9 @@ void AdvancedSettingsWidget::onResetToDefaultClicked() int i = 0; setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Disable all enhancements - setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Show status indicators setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Show enhancement settings + setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Show status indicators + setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Apply compatibility settings setIntRangeTweakOption(m_ui.tweakOptionTable, i++, 0); // Display FPS limit setChoiceTweakOption(m_ui.tweakOptionTable, i++, 0); // Multisample antialiasing setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // PGXP vertex cache