Core: apply Dolphin OnFrame patches right after boot
This commit is contained in:
parent
904ac5592d
commit
fd95607700
|
@ -211,7 +211,7 @@ void SConfig::OnNewTitleLoad(const Core::CPUThreadGuard& guard)
|
|||
}
|
||||
CBoot::LoadMapFromFilename(guard, ppc_symbol_db);
|
||||
HLE::Reload(system);
|
||||
PatchEngine::Reload();
|
||||
PatchEngine::Reload(system);
|
||||
HiresTexture::Update();
|
||||
WC24PatchEngine::Reload();
|
||||
}
|
||||
|
|
|
@ -295,6 +295,13 @@ void RemoveMemoryPatch(std::size_t index)
|
|||
std::erase(s_on_frame_memory, index);
|
||||
}
|
||||
|
||||
static void ApplyStartupPatches(Core::System& system)
|
||||
{
|
||||
ASSERT(Core::IsCPUThread());
|
||||
Core::CPUThreadGuard guard(system);
|
||||
ApplyPatches(guard, s_on_frame);
|
||||
}
|
||||
|
||||
bool ApplyFramePatches(Core::System& system)
|
||||
{
|
||||
const auto& ppc_state = system.GetPPCState();
|
||||
|
@ -332,10 +339,11 @@ void Shutdown()
|
|||
Gecko::Shutdown();
|
||||
}
|
||||
|
||||
void Reload()
|
||||
void Reload(Core::System& system)
|
||||
{
|
||||
Shutdown();
|
||||
LoadPatches();
|
||||
ApplyStartupPatches(system);
|
||||
}
|
||||
|
||||
} // namespace PatchEngine
|
||||
|
|
|
@ -61,7 +61,7 @@ void RemoveMemoryPatch(std::size_t index);
|
|||
|
||||
bool ApplyFramePatches(Core::System& system);
|
||||
void Shutdown();
|
||||
void Reload();
|
||||
void Reload(Core::System& system);
|
||||
|
||||
inline int GetPatchTypeCharLength(PatchType type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue