From c3a2156c798c97cd2461bfdd0dcb340c8d6e63e7 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 12 Dec 2024 16:24:16 +1000 Subject: [PATCH] CPU/CodeCache: Fix event kicking for Cached Interpreter --- src/core/cpu_code_cache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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(); } }