System: Fix setting-altering game patch behaviour

e.g. overclock was only half applying
This commit is contained in:
Stenzek 2025-02-14 23:50:32 +10:00
parent bceadadcb4
commit e0620fcd40
No known key found for this signature in database
1 changed files with 8 additions and 7 deletions

View File

@ -1863,6 +1863,14 @@ bool System::BootSystem(SystemBootParameters parameters, Error* error)
bool System::Initialize(std::unique_ptr<CDImage> disc, DiscRegion disc_region, bool force_software_renderer,
bool fullscreen, Error* error)
{
// Cheats have to be loaded first, otherwise we don't apply settings that are used below.
if (!IsReplayingGPUDump())
{
Cheats::ReloadCheats(true, true, false, true, true);
if (Cheats::HasAnySettingOverrides())
ApplySettings(true);
}
s_state.ticks_per_second = ScaleTicksToOverclock(MASTER_CLOCK);
s_state.max_slice_ticks = ScaleTicksToOverclock(MASTER_CLOCK / 10);
s_state.frame_number = 1;
@ -1927,13 +1935,6 @@ bool System::Initialize(std::unique_ptr<CDImage> disc, DiscRegion disc_region, b
UpdateThrottlePeriod();
UpdateMemorySaveStateSettings();
if (!IsReplayingGPUDump())
{
Cheats::ReloadCheats(true, true, false, true, true);
if (Cheats::HasAnySettingOverrides())
ApplySettings(true);
}
PerformanceCounters::Clear();
return true;