mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-25 06:44:59 +00:00
Merge pull request #13329 from noahpistilli/guard-startup-patches
Core: Check if msr.DR and msr.IR are valid at ApplyStartupPatches
This commit is contained in:
commit
aced90de97
1 changed files with 11 additions and 0 deletions
|
@ -293,6 +293,17 @@ static void ApplyStartupPatches(Core::System& system)
|
||||||
{
|
{
|
||||||
ASSERT(Core::IsCPUThread());
|
ASSERT(Core::IsCPUThread());
|
||||||
Core::CPUThreadGuard guard(system);
|
Core::CPUThreadGuard guard(system);
|
||||||
|
|
||||||
|
const auto& ppc_state = system.GetPPCState();
|
||||||
|
if (!ppc_state.msr.DR || !ppc_state.msr.IR)
|
||||||
|
{
|
||||||
|
DEBUG_LOG_FMT(ACTIONREPLAY,
|
||||||
|
"Need to retry later. CPU configuration is currently incorrect. PC = {:#010x}, "
|
||||||
|
"MSR = {:#010x}",
|
||||||
|
ppc_state.pc, ppc_state.msr.Hex);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ApplyPatches(guard, s_on_frame);
|
ApplyPatches(guard, s_on_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue