Skip to content

Commit

Permalink
Interpreter: Fix cycle counting inconsistency between debug mode and …
Browse files Browse the repository at this point in the history
…regular mode loops.
  • Loading branch information
AdmiralCurtiss committed Dec 28, 2021
1 parent 8d237eb commit ebe27e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -301,9 +301,9 @@ void Interpreter::Run()
Host_UpdateDisasmDialog();
return;
}
SingleStepInner();
cycles += SingleStepInner();
}
PowerPC::ppcState.downcount -= i;
PowerPC::ppcState.downcount -= cycles;
}
}
else
Expand Down

0 comments on commit ebe27e0

Please sign in to comment.