Config: Don't copy global WS/NI to game settings

This commit is contained in:
Stenzek 2024-07-01 18:53:20 +10:00 committed by Connor McLaughlin
parent e7139ab801
commit 46e30467de
4 changed files with 12 additions and 0 deletions

View File

@ -299,6 +299,7 @@ void SettingsWindow::onCopyGlobalSettingsClicked()
{
auto lock = Host::GetSettingsLock();
Pcsx2Config::CopyConfiguration(m_sif.get(), *Host::Internal::GetBaseSettingsLayer());
Pcsx2Config::ClearInvalidPerGameConfiguration(m_sif.get());
}
saveAndReloadGameSettings();

View File

@ -1195,6 +1195,9 @@ struct Pcsx2Config
/// Clears all core keys from the specified interface.
static void ClearConfiguration(SettingsInterface* dest_si);
/// Removes keys that are not valid for per-game settings.
static void ClearInvalidPerGameConfiguration(SettingsInterface* si);
};
extern Pcsx2Config EmuConfig;

View File

@ -2770,6 +2770,7 @@ void FullscreenUI::DoCopyGameSettings()
return;
Pcsx2Config::CopyConfiguration(s_game_settings_interface.get(), *GetEditingSettingsInterface(false));
Pcsx2Config::ClearInvalidPerGameConfiguration(s_game_settings_interface.get());
SetSettingsChanged(s_game_settings_interface.get());

View File

@ -1838,6 +1838,13 @@ void Pcsx2Config::ClearConfiguration(SettingsInterface* dest_si)
temp.LoadSaveCore(wrapper);
}
void Pcsx2Config::ClearInvalidPerGameConfiguration(SettingsInterface* si)
{
// Deprecated in favor of patches.
si->DeleteValue("EmuCore", "EnableWideScreenPatches");
si->DeleteValue("EmuCore", "EnableNoInterlacingPatches");
}
void EmuFolders::SetAppRoot()
{
const std::string program_path = FileSystem::GetProgramPath();