From 552144c24d70ba59402ddeda01642c6748867f95 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 00:25:55 +0100 Subject: [PATCH] Revert "Make 'Show FPS" work again" This reverts commit b433ccab09d4a56b5e3eaed109a845e6dab22f17. --- gfx/video_driver.c | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 1e0954bae2..9ff334989e 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1050,35 +1050,35 @@ bool video_monitor_get_fps( video_driver_frame_time_samples[write_index] = new_time - fps_time; fps_time = new_time; - if (!video_info.fullscreen) + if (video_info.fullscreen) + return false; + + if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) { - if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) + char frames_text[64]; + + last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); + curr_time = new_time; + + fill_pathname_noext(buf, + video_driver_title_buf, + " || ", + size); + + if (video_info.fps_show) { - char frames_text[64]; - - last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); - curr_time = new_time; - - fill_pathname_noext(buf, - video_driver_title_buf, - " || ", - size); - - if (video_info.fps_show) - { - char fps_text[64]; - snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); - strlcat(buf, fps_text, size); - } - - strlcat(buf, "Frames: ", size); - - snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, - (unsigned long long)video_driver_frame_count); - - strlcat(buf, frames_text, size); - ret = true; + char fps_text[64]; + snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); + strlcat(buf, fps_text, size); } + + strlcat(buf, "Frames: ", size); + + snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, + (unsigned long long)video_driver_frame_count); + + strlcat(buf, frames_text, size); + ret = true; } if (buf_fps && video_info.fps_show)