X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxcounters.c;h=02191c712bd615650189639157293d8b82b11ab9;hb=9b84c4f7c6edcd29dc0a38f3d68263813366b8d3;hp=9ff679e20939b3a9b813195c8f17bdba7b893eca;hpb=1351a8fbef932e26a56e841b6c43de6d907fde5c;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index 9ff679e2..02191c71 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -572,13 +572,13 @@ s32 psxRcntFreeze( void *f, s32 Mode ) if (Mode == 0) { - // don't trust things from a savestate rcnts[3].rate = 1; - for( i = 0; i < CounterQuantity; ++i ) + for( i = 0; i < CounterQuantity - 1; ++i ) { _psxRcntWmode( i, rcnts[i].mode ); count = (psxRegs.cycle - rcnts[i].cycleStart) / rcnts[i].rate; - _psxRcntWcount( i, count ); + if (count > 0x1000) + _psxRcntWcount( i, count & 0xffff ); } scheduleRcntBase(); psxRcntSet();