From 8f0722a1aa6442ff4b30e59371d844de7a370457 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 28 Nov 2015 20:05:15 -0800 Subject: Dividing by FPS_INTERVAL does not make senese as the division was to convert milliseconds to seconds --- render_sdl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'render_sdl.c') 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 } -- cgit v1.2.3