* FPS counter displays target framerate

* fix potential hang and out-of-bounds drawing when VCount is modified during drawing
This commit is contained in:
StapleButter
2017-07-21 10:19:56 +02:00
parent cfb9e20fe1
commit 0df3a29374
5 changed files with 20 additions and 6 deletions

View File

@ -496,8 +496,12 @@ wxThread::ExitCode EmuThread::Entry()
u32 fps = (nframes * 1000) / diff;
nframes = 0;
float fpstarget;
if (framerate < 1) fpstarget = 999;
else fpstarget = 1000.0f/framerate;
char melontitle[100];
sprintf(melontitle, "%d FPS - melonDS " MELONDS_VERSION, fps);
sprintf(melontitle, "%d/%.0f FPS | melonDS " MELONDS_VERSION, fps, fpstarget);
SDL_SetWindowTitle(sdlwin, melontitle);
}
}