mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Use gfx_window_title for console ports as well - make gfx_get_fps
static
This commit is contained in:
parent
ddc1e0fda7
commit
15e08db76e
@ -52,7 +52,7 @@ static float tv_to_fps(const struct timeval *tv, const struct timeval *new_tv, i
|
|||||||
|
|
||||||
static unsigned gl_frames = 0;
|
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;
|
static struct timeval tv;
|
||||||
struct timeval new_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);
|
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);
|
snprintf(buf, size, "%s || FPS: %6.1f || Frames: %d", g_extern.title_buf, fps, gl_frames);
|
||||||
|
#endif
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "../boolean.h"
|
#include "../boolean.h"
|
||||||
|
|
||||||
bool gfx_get_fps(char *buf, size_t size);
|
|
||||||
bool gfx_window_title(char *buf, size_t size);
|
bool gfx_window_title(char *buf, size_t size);
|
||||||
void gfx_window_title_reset(void);
|
void gfx_window_title_reset(void);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user