mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-03-06 21:00:31 +01:00
fix framelimiter bugs (#2256)
This commit is contained in:
parent
0c5dd28b1c
commit
a9cce557d2
1 changed files with 3 additions and 2 deletions
|
@ -366,7 +366,7 @@ void EmuThread::run()
|
||||||
|
|
||||||
if (slowmo) emuInstance->curFPS = emuInstance->slowmoFPS;
|
if (slowmo) emuInstance->curFPS = emuInstance->slowmoFPS;
|
||||||
else if (fastforward) emuInstance->curFPS = emuInstance->fastForwardFPS;
|
else if (fastforward) emuInstance->curFPS = emuInstance->fastForwardFPS;
|
||||||
else if (!emuInstance->doLimitFPS) emuInstance->curFPS = 1000.0;
|
else if (!emuInstance->doLimitFPS && !emuInstance->doAudioSync) emuInstance->curFPS = 1000.0;
|
||||||
else emuInstance->curFPS = emuInstance->targetFPS;
|
else emuInstance->curFPS = emuInstance->targetFPS;
|
||||||
|
|
||||||
if (emuInstance->audioDSiVolumeSync && emuInstance->nds->ConsoleType == 1)
|
if (emuInstance->audioDSiVolumeSync && emuInstance->nds->ConsoleType == 1)
|
||||||
|
@ -389,6 +389,7 @@ void EmuThread::run()
|
||||||
|
|
||||||
if (frametimeStep < 0.001) frametimeStep = 0.001;
|
if (frametimeStep < 0.001) frametimeStep = 0.001;
|
||||||
|
|
||||||
|
if (emuInstance->doLimitFPS)
|
||||||
{
|
{
|
||||||
double curtime = SDL_GetPerformanceCounter() * perfCountsSec;
|
double curtime = SDL_GetPerformanceCounter() * perfCountsSec;
|
||||||
|
|
||||||
|
@ -430,7 +431,7 @@ void EmuThread::run()
|
||||||
if (inst == 0)
|
if (inst == 0)
|
||||||
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS " MELONDS_VERSION, fps, actualfps);
|
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS " MELONDS_VERSION, fps, actualfps);
|
||||||
else
|
else
|
||||||
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS (%d)", fps, fpstarget, inst+1);
|
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS (%d)", fps, actualfps, inst+1);
|
||||||
changeWindowTitle(melontitle);
|
changeWindowTitle(melontitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue