diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index b78f73307b..1368c2187e 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -52,12 +52,7 @@ static float tv_to_fps(const struct timeval *tv, const struct timeval *new_tv, i static unsigned gl_frames = 0; -void gfx_window_title_reset(void) -{ - gl_frames = 0; -} - -bool gfx_window_title(char *buf, size_t size) +bool gfx_get_fps(char *buf, size_t size) { static struct timeval tv; struct timeval new_tv; @@ -81,6 +76,18 @@ bool gfx_window_title(char *buf, size_t size) ret = true; } + return ret; +} + +void gfx_window_title_reset(void) +{ + gl_frames = 0; +} + +bool gfx_window_title(char *buf, size_t size) +{ + bool ret = gfx_get_fps(buf, size); + gl_frames++; return ret; } diff --git a/gfx/gfx_common.h b/gfx/gfx_common.h index 2f30488fb3..7e5b5da313 100644 --- a/gfx/gfx_common.h +++ b/gfx/gfx_common.h @@ -19,6 +19,7 @@ #include #include "../boolean.h" +bool gfx_get_fps(char *buf, size_t size); bool gfx_window_title(char *buf, size_t size); void gfx_window_title_reset(void);