aboutsummaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-07-21 10:19:56 +0200
committerStapleButter <thetotalworm@gmail.com>2017-07-21 10:19:56 +0200
commit0df3a293746fd5f2d5550150225904905a72000f (patch)
tree30b5d8148f3fc4918610698c51e93f6253963cef /src/wx
parentcfb9e20fe1606fb63cc97e1c57df29bdbeb2825b (diff)
* FPS counter displays target framerate
* fix potential hang and out-of-bounds drawing when VCount is modified during drawing
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/main.cpp6
1 files changed, 5 insertions, 1 deletions
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);
}
}