mirror of https://github.com/snes9xgit/snes9x.git
win32: fix speed up / down
This commit is contained in:
parent
b1ea4c86b6
commit
f66e081c8c
|
@ -708,10 +708,12 @@ void WinThrottleFramerate()
|
||||||
QueryPerformanceCounter((LARGE_INTEGER *)&PCStart);
|
QueryPerformanceCounter((LARGE_INTEGER *)&PCStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.PAL)
|
if (Settings.FrameTime == Settings.FrameTimeNTSC)
|
||||||
PCFrameTime = PCFrameTimePAL;
|
PCFrameTime = PCFrameTimeNTSC;
|
||||||
else
|
else if (Settings.FrameTime == Settings.FrameTimePAL)
|
||||||
PCFrameTime = PCFrameTimeNTSC;
|
PCFrameTime = PCFrameTimePAL;
|
||||||
|
else
|
||||||
|
PCFrameTime = (__int64)(PCBase * Settings.FrameTime / 1e6);
|
||||||
|
|
||||||
QueryPerformanceCounter((LARGE_INTEGER *)&PCEnd);
|
QueryPerformanceCounter((LARGE_INTEGER *)&PCEnd);
|
||||||
int64_t time_left_us = ((PCFrameTime - (PCEnd - PCStart)) * 1000000) / PCBase;
|
int64_t time_left_us = ((PCFrameTime - (PCEnd - PCStart)) * 1000000) / PCBase;
|
||||||
|
|
Loading…
Reference in New Issue