mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Merge pull request #13136 from Tilka/startup_patch
Core: apply Dolphin OnFrame patches right after boot
This commit is contained in:
commit
2764a3dc44
@ -211,7 +211,7 @@ void SConfig::OnNewTitleLoad(const Core::CPUThreadGuard& guard)
|
|||||||
}
|
}
|
||||||
CBoot::LoadMapFromFilename(guard, ppc_symbol_db);
|
CBoot::LoadMapFromFilename(guard, ppc_symbol_db);
|
||||||
HLE::Reload(system);
|
HLE::Reload(system);
|
||||||
PatchEngine::Reload();
|
PatchEngine::Reload(system);
|
||||||
HiresTexture::Update();
|
HiresTexture::Update();
|
||||||
WC24PatchEngine::Reload();
|
WC24PatchEngine::Reload();
|
||||||
}
|
}
|
||||||
|
@ -295,6 +295,13 @@ void RemoveMemoryPatch(std::size_t index)
|
|||||||
std::erase(s_on_frame_memory, 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)
|
bool ApplyFramePatches(Core::System& system)
|
||||||
{
|
{
|
||||||
const auto& ppc_state = system.GetPPCState();
|
const auto& ppc_state = system.GetPPCState();
|
||||||
@ -332,10 +339,11 @@ void Shutdown()
|
|||||||
Gecko::Shutdown();
|
Gecko::Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reload()
|
void Reload(Core::System& system)
|
||||||
{
|
{
|
||||||
Shutdown();
|
Shutdown();
|
||||||
LoadPatches();
|
LoadPatches();
|
||||||
|
ApplyStartupPatches(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace PatchEngine
|
} // namespace PatchEngine
|
||||||
|
@ -61,7 +61,7 @@ void RemoveMemoryPatch(std::size_t index);
|
|||||||
|
|
||||||
bool ApplyFramePatches(Core::System& system);
|
bool ApplyFramePatches(Core::System& system);
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
void Reload();
|
void Reload(Core::System& system);
|
||||||
|
|
||||||
inline int GetPatchTypeCharLength(PatchType type)
|
inline int GetPatchTypeCharLength(PatchType type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user