changeset 906:8cf57c6558ed

Dividing by FPS_INTERVAL does not make senese as the division was to convert milliseconds to seconds
author Michael Pavone <pavone@retrodev.com>
date Sat, 28 Nov 2015 20:05:15 -0800
parents b3b399665356
children b5d35222047e
files render_sdl.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/render_sdl.c	Sat Nov 28 14:49:34 2015 -0800
+++ b/render_sdl.c	Sat Nov 28 20:05:15 2015 -0800
@@ -588,14 +588,13 @@
 	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
 		}