diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index fe0878eaf..9b8aba462 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -752,11 +752,12 @@ template if (g_state.pending_ticks >= g_state.downcount) \ break; - for (;;) - { + if (g_state.pending_ticks >= g_state.downcount) TimingEvents::RunEvents(); - while (g_state.pending_ticks < g_state.downcount) + for (;;) + { + for (;;) { #if 0 LogCurrentState(); @@ -830,6 +831,8 @@ template CHECK_DOWNCOUNT(); continue; } + + TimingEvents::RunEvents(); } }