Skip to content

Commit

Permalink
fix framelimiter bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaklyy committed Jan 14, 2025
1 parent 0c5dd28 commit 5af06a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/frontend/qt_sdl/EmuThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void EmuThread::run()

if (slowmo) emuInstance->curFPS = emuInstance->slowmoFPS;
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;

if (emuInstance->audioDSiVolumeSync && emuInstance->nds->ConsoleType == 1)
Expand All @@ -389,6 +389,7 @@ void EmuThread::run()

if (frametimeStep < 0.001) frametimeStep = 0.001;

if (emuInstance->doLimitFPS)
{
double curtime = SDL_GetPerformanceCounter() * perfCountsSec;

Expand Down Expand Up @@ -430,7 +431,7 @@ void EmuThread::run()
if (inst == 0)
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS " MELONDS_VERSION, fps, actualfps);
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);
}
}
Expand Down

0 comments on commit 5af06a9

Please sign in to comment.