diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-11-28 20:05:15 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-11-28 20:05:15 -0800 |
commit | 8f0722a1aa6442ff4b30e59371d844de7a370457 (patch) | |
tree | f10314ec2c988d23c8e08a734ce963513a97c51a | |
parent | fb572183c84e136f2b1c9f095b96a8a341d04b6b (diff) |
Dividing by FPS_INTERVAL does not make senese as the division was to convert milliseconds to seconds
-rwxr-xr-x | render_sdl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/render_sdl.c b/render_sdl.c index bfa1451..553239b 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -588,14 +588,13 @@ int wait_render_frame(vdp_context * context, int frame_limit) frame_counter++; if ((last_frame - start) > FPS_INTERVAL) { if (start && (last_frame-start)) { +#ifdef __ANDROID__ + info_message("%s - %.1f fps", caption, ((float)frame_counter) / (((float)(last_frame-start)) / 1000.0)); +#else if (!fps_caption) { fps_caption = malloc(strlen(caption) + strlen(" - 100000000.1 fps") + 1); } - -#ifdef __ANDROID__ - info_message("%s - %.1f fps", caption, ((float)frame_counter) / (((float)(last_frame-start)) / (float)FPS_INTERVAL)); -#else - sprintf(fps_caption, "%s - %.1f fps", caption, ((float)frame_counter) / (((float)(last_frame-start)) / (float)FPS_INTERVAL)); + sprintf(fps_caption, "%s - %.1f fps", caption, ((float)frame_counter) / (((float)(last_frame-start)) / 1000.0)); SDL_SetWindowTitle(main_window, fps_caption); #endif } |