From f689b1e6b5acec0070268bdbd8b563f0fcb8bfda Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Sun, 11 Sep 2016 22:46:12 -0400 Subject: [PATCH] Switch the CPU state to CPU_STEPPING before single stepping after unpausing This fix a double break bug when hitting a memcheck and hitting play on the same instruction it broke to earlier. The state is put back to CPU_RUNNING after. --- Source/Core/Core/HW/CPU.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp index 5a17e5b01e..01445006e8 100644 --- a/Source/Core/Core/HW/CPU.cpp +++ b/Source/Core/Core/HW/CPU.cpp @@ -92,10 +92,12 @@ void Run() if (PowerPC::breakpoints.IsAddressBreakPoint(PC)) #endif { + s_state = CPU_STEPPING; PowerPC::CoreMode old_mode = PowerPC::GetMode(); PowerPC::SetMode(PowerPC::MODE_INTERPRETER); PowerPC::SingleStep(); PowerPC::SetMode(old_mode); + s_state = CPU_RUNNING; } }