Corrected the UpdateVSyncRate functions to properly set a NTSC framerate of 59.94fps. When framelimiting is enabled on NTSC games, the SPU2 plugin now does not need to stretch constantly.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@134 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
ramapcsx2 2008-09-20 08:31:32 +00:00 committed by Gregory Hainaut
parent 7509047e20
commit b0c4145950
2 changed files with 18 additions and 8 deletions

View File

@ -195,10 +195,15 @@ void UpdateVSyncRate() {
counters[5].Cycle = PS2VBLANKEND;*/
{
u32 vsyncs = (Config.PsxType&1) ? 50:60;
if(Config.CustomFps>0) vsyncs = Config.CustomFps;
iTicks = GetTickFrequency()/vsyncs;
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): %d fps\n",vsyncs);
u32 vsyncs = (Config.PsxType&1) ? 5000:5994;
if(Config.CustomFps>0) vsyncs = Config.CustomFps*100;
iTicks = GetTickFrequency()/vsyncs*100;
if (Config.CustomFps != 0)
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): %d fps\n", Config.CustomFps);
else if (Config.PsxType&1)
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50 fps\n");
else
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50.94 fps\n");
}
rcntSet();
}

View File

@ -534,10 +534,15 @@ void cpuExecuteBios()
{
extern u64 GetTickFrequency();
extern u64 iTicks;
u32 vsyncs = (Config.PsxType&1) ? 50:60;
if(Config.CustomFps>0) vsyncs = Config.CustomFps;
iTicks = GetTickFrequency()/vsyncs;
SysPrintf("Framelimiter rate updated (cpuExecuteBios): %d fps\n",vsyncs);
u32 vsyncs = (Config.PsxType&1) ? 5000:5994;
if(Config.CustomFps>0) vsyncs = Config.CustomFps*100;
iTicks = GetTickFrequency()/vsyncs*100;
if (Config.CustomFps != 0)
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): %d fps\n", Config.CustomFps);
else if (Config.PsxType&1)
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50 fps\n");
else
SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50.94 fps\n");
}
SysPrintf("* PCSX2 *: ExecuteBios\n");