From 74a0bb9f83cb116827118571351a2f4880a0fb7e Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 2 Jun 2022 23:22:19 +0300 Subject: [PATCH] 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 --- libpcsxcore/psxcounters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index b2cc07b2..1788db67 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -299,19 +299,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 ); } -- 2.39.5