Skip to content

Commit

Permalink
System: Fix setting-altering game patch behaviour
Browse files Browse the repository at this point in the history
e.g. overclock was only half applying
  • Loading branch information
stenzek committed Feb 14, 2025
1 parent bceadad commit e0620fc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/core/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e0620fc

Please sign in to comment.