From d5b40fbbe0eee90573ec1848ac135962fba9438e Mon Sep 17 00:00:00 2001 From: iCatButler Date: Sat, 30 Jul 2016 17:26:32 +0100 Subject: Use overclock on load state - Recalculate CPU counters using current clock speed on loading a new state --- libpcsxcore/psxcounters.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpcsxcore') diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index 000a8929..01fc7c2b 100755 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -521,6 +521,10 @@ s32 psxRcntFreeze( gzFile f, s32 Mode ) if (Mode == 0) { psxHsyncCalculate(); + // iCB: recalculate target count in case overclock is changed + rcnts[3].target = (PSXCLK / (FrameRate[Config.PsxType] * HSyncTotal[Config.PsxType])); + if(rcnts[1].rate != 1) + rcnts[1].rate = (PSXCLK / (FrameRate[Config.PsxType] * HSyncTotal[Config.PsxType])); } return 0; -- cgit v1.2.3