Skip to content

Commit

Permalink
Config: Don't copy global WS/NI to game settings
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jul 2, 2024
1 parent e7139ab commit 46e3046
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions pcsx2-qt/Settings/SettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
3 changes: 3 additions & 0 deletions pcsx2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions pcsx2/ImGui/FullscreenUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
7 changes: 7 additions & 0 deletions pcsx2/Pcsx2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 46e3046

Please sign in to comment.