From: notaz Date: Thu, 2 Jun 2022 20:22:19 +0000 (+0300) Subject: psxcounters: try to support a dynarec with a very long timeslice X-Git-Tag: r24~371 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=commitdiff_plain;h=e78515041f52dad93f52e09195231d13b609487d psxcounters: try to support a dynarec with a very long timeslice The dynarec instead should probably not run for thousands of cycles doing no interrupt checks, but maybe this hack will be enough. libretro/pcsx_rearmed#658 --- diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index ff0efbce..3342770e 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -300,19 +300,19 @@ void psxRcntUpdate() cycle = psxRegs.cycle; // rcnt 0. - if( cycle - rcnts[0].cycleStart >= rcnts[0].cycle ) + while( cycle - rcnts[0].cycleStart >= rcnts[0].cycle ) { psxRcntReset( 0 ); } // rcnt 1. - if( cycle - rcnts[1].cycleStart >= rcnts[1].cycle ) + while( cycle - rcnts[1].cycleStart >= rcnts[1].cycle ) { psxRcntReset( 1 ); } // rcnt 2. - if( cycle - rcnts[2].cycleStart >= rcnts[2].cycle ) + while( cycle - rcnts[2].cycleStart >= rcnts[2].cycle ) { psxRcntReset( 2 ); }