From 15e08db76e4852e39f3a87dc23060e3b2805db3d Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 15 Jul 2012 18:40:41 +0200 Subject: [PATCH] Use gfx_window_title for console ports as well - make gfx_get_fps static --- gfx/gfx_common.c | 6 +++++- gfx/gfx_common.h | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index 1368c2187e..b09423da4f 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -52,7 +52,7 @@ static float tv_to_fps(const struct timeval *tv, const struct timeval *new_tv, i static unsigned gl_frames = 0; -bool gfx_get_fps(char *buf, size_t size) +static bool gfx_get_fps(char *buf, size_t size) { static struct timeval tv; struct timeval new_tv; @@ -72,7 +72,11 @@ bool gfx_get_fps(char *buf, size_t size) float fps = tv_to_fps(&tmp_tv, &new_tv, 180); +#ifdef RARCH_CONSOLE + snprintf(buf, size, "FPS: %6.1f || Frames: %d", fps, gl_frames); +#else snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, fps, gl_frames); +#endif ret = true; } diff --git a/gfx/gfx_common.h b/gfx/gfx_common.h index 7e5b5da313..2f30488fb3 100644 --- a/gfx/gfx_common.h +++ b/gfx/gfx_common.h @@ -19,7 +19,6 @@ #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);