diff --git a/core/rec-x64/rec_x64.cpp b/core/rec-x64/rec_x64.cpp index c4e7a5986..1b3a13c11 100644 --- a/core/rec-x64/rec_x64.cpp +++ b/core/rec-x64/rec_x64.cpp @@ -42,15 +42,16 @@ void ngen_mainloop(void* v_cntx) { Sh4RCB* ctx = (Sh4RCB*)((u8*)v_cntx - sizeof(Sh4RCB)); - cycle_counter = 0; + cycle_counter = SH4_TIMESLICE; while (sh4_int_bCpuRun) { - cycle_counter = SH4_TIMESLICE; do { DynarecCodeEntryPtr rcb = bm_GetCode(ctx->cntx.pc); rcb(); } while (cycle_counter > 0); + cycle_counter += SH4_TIMESLICE; + if (UpdateSystem()) { rdv_DoInterrupts_pc(ctx->cntx.pc); }