diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-12-28 05:48:33 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-12-28 05:48:33 +0100 |
| commit | ebe27e0140d0b1b9735cfddeb8f5306339f3cdeb (patch) | |
| tree | c95ec2f550f7fe2d271f7098040ef60438c101f0 /Source/Core | |
| parent | 8d237eb1020dd57d7521f1ea5af16045e7991bf4 (diff) | |
Interpreter: Fix cycle counting inconsistency between debug mode and regular mode loops.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 1582291f04..d984360684 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -260,8 +260,8 @@ void Interpreter::Run() while (PowerPC::ppcState.downcount > 0) { m_end_block = false; - int i; - for (i = 0; !m_end_block; i++) + int cycles = 0; + while (!m_end_block) { #ifdef SHOW_HISTORY s_pc_vec.push_back(PC); @@ -301,9 +301,9 @@ void Interpreter::Run() Host_UpdateDisasmDialog(); return; } - SingleStepInner(); + cycles += SingleStepInner(); } - PowerPC::ppcState.downcount -= i; + PowerPC::ppcState.downcount -= cycles; } } else |
