mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +00:00
System: Move cheat reload to Initialize()
This commit is contained in:
parent
57cb2f846e
commit
2cfc39e874
@ -1364,6 +1364,9 @@ void System::ReloadGameSettings(bool display_osd_messages)
|
|||||||
if (!IsValid() || !UpdateGameSettingsLayer())
|
if (!IsValid() || !UpdateGameSettingsLayer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!IsReplayingGPUDump())
|
||||||
|
Cheats::ReloadCheats(false, true, false, true);
|
||||||
|
|
||||||
ApplySettings(display_osd_messages);
|
ApplySettings(display_osd_messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1508,10 +1511,6 @@ bool System::UpdateGameSettingsLayer()
|
|||||||
s_state.game_settings_interface = std::move(new_interface);
|
s_state.game_settings_interface = std::move(new_interface);
|
||||||
|
|
||||||
UpdateInputSettingsLayer(std::move(input_profile_name), lock);
|
UpdateInputSettingsLayer(std::move(input_profile_name), lock);
|
||||||
|
|
||||||
if (!IsReplayingGPUDump())
|
|
||||||
Cheats::ReloadCheats(false, true, false, true);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1928,6 +1927,9 @@ bool System::Initialize(std::unique_ptr<CDImage> disc, DiscRegion disc_region, b
|
|||||||
UpdateThrottlePeriod();
|
UpdateThrottlePeriod();
|
||||||
UpdateMemorySaveStateSettings();
|
UpdateMemorySaveStateSettings();
|
||||||
|
|
||||||
|
if (!IsReplayingGPUDump())
|
||||||
|
Cheats::ReloadCheats(true, true, false, true);
|
||||||
|
|
||||||
PerformanceCounters::Clear();
|
PerformanceCounters::Clear();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -4172,16 +4174,17 @@ void System::UpdateRunningGame(const std::string& path, CDImage* image, bool boo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateGameSettingsLayer();
|
||||||
|
|
||||||
if (!IsReplayingGPUDump())
|
if (!IsReplayingGPUDump())
|
||||||
{
|
{
|
||||||
Achievements::GameChanged(s_state.running_game_path, image, booting);
|
Achievements::GameChanged(s_state.running_game_path, image, booting);
|
||||||
|
|
||||||
// game layer reloads cheats, but only the active list, we need new files
|
// Cheats are loaded later in Initialize().
|
||||||
Cheats::ReloadCheats(true, false, false, true);
|
if (!booting)
|
||||||
|
Cheats::ReloadCheats(true, true, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateGameSettingsLayer();
|
|
||||||
|
|
||||||
ApplySettings(true);
|
ApplySettings(true);
|
||||||
|
|
||||||
if (s_state.running_game_serial != prev_serial)
|
if (s_state.running_game_serial != prev_serial)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user