From 4e73d3ec54ed340e07bda2712f4381fb15bbf699 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Mon, 24 May 2010 09:18:34 +0000 Subject: Fixed freeze bug when launching an NTSC game when Config.PsxAuto is enabled and Config.PsxType is set to PAL. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@48663 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- ChangeLog | 8 +++++--- libpcsxcore/psxcounters.c | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ad162dd..5c9b46a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,10 +3,12 @@ May 24, 2010 Wei Mingzhi * win32/gui/WndMain.c: Also show Japanese titles properly for Windows (need to set ACP to east-asian languages). * win32/intl/gettext.c: Added a hack for UTF-8 support. - * win32/gui/AboutDlg.c: Updated info. - * win32/config.h: Silenced MSVC6 warnings. - * libpcsxcore/psxbios.c: Implemented more functions. RNG should behave + * win32/gui/AboutDlg.c: Updated info. + * win32/config.h: Silenced MSVC6 warnings. + * libpcsxcore/psxbios.c: Implemented more functions. RNG should behave exactly the same as real BIOS now. + * libpcsxcore/psxcounters.c: Fixed freeze bug when launching an NTSC game + when Config.PsxAuto is enabled and Config.PsxType is set to PAL. May 23, 2010 Wei Mingzhi diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index d1089b66..16cea3af 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -75,10 +75,10 @@ static const s32 VerboseLevel = 0; static Rcnt rcnts[ CounterQuantity ]; -static u32 hSyncCount; -static u32 spuSyncCount; +static u32 hSyncCount = 0; +static u32 spuSyncCount = 0; -u32 psxNextCounter, psxNextsCounter; +u32 psxNextCounter = 0, psxNextsCounter = 0; /******************************************************************************/ @@ -273,7 +273,7 @@ void psxRcntUpdate() hSyncCount++; // Update spu. - if( spuSyncCount == SpuUpdInterval[Config.PsxType] ) + if( spuSyncCount >= SpuUpdInterval[Config.PsxType] ) { spuSyncCount = 0; @@ -285,13 +285,13 @@ void psxRcntUpdate() /* // For the best times. :D // VSync irq. - if( hSyncCount == VBlankStart[Config.PsxType] ) + if( hSyncCount >= VBlankStart[Config.PsxType] ) { setIrq( 0x01 ); } */ // Update lace. (with InuYasha fix) - if( hSyncCount == (Config.VSyncWA ? HSyncTotal[Config.PsxType] / BIAS : HSyncTotal[Config.PsxType]) ) + if( hSyncCount >= (Config.VSyncWA ? HSyncTotal[Config.PsxType] / BIAS : HSyncTotal[Config.PsxType]) ) { hSyncCount = 0; -- cgit v1.2.3