From 0df3a293746fd5f2d5550150225904905a72000f Mon Sep 17 00:00:00 2001 From: StapleButter Date: Fri, 21 Jul 2017 10:19:56 +0200 Subject: * FPS counter displays target framerate * fix potential hang and out-of-bounds drawing when VCount is modified during drawing --- src/wx/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/wx') diff --git a/src/wx/main.cpp b/src/wx/main.cpp index 3c2375b..302f5da 100644 --- a/src/wx/main.cpp +++ b/src/wx/main.cpp @@ -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); } } -- cgit v1.2.3