(RARCH_CONSOLE) Add refresh rate FPS statistics

This commit is contained in:
twinaphex 2013-06-08 01:45:04 +02:00
parent 841e8d1bb5
commit 559c4a7964
6 changed files with 16 additions and 9 deletions

View File

@ -197,12 +197,7 @@ static void gfx_ctx_set_resize(unsigned width, unsigned height)
static void gfx_ctx_update_window_title(void)
{
char buf[128];
#if 0
if (gfx_get_fps(buf, sizeof(buf), false))
RARCH_LOG("%s.\n", buf);
#else
gfx_get_fps(buf, sizeof(buf), false);
#endif
}
static bool gfx_ctx_set_video_mode(

View File

@ -184,7 +184,11 @@ static void gfx_ctx_swap_buffers(void)
static void gfx_ctx_set_resize(unsigned width, unsigned height) { }
static void gfx_ctx_update_window_title(void) { }
static void gfx_ctx_update_window_title(void)
{
char buf[128];
gfx_get_fps(buf, sizeof(buf), false);
}
static void gfx_ctx_get_video_size(unsigned *width, unsigned *height)
{

View File

@ -77,7 +77,11 @@ static bool gfx_ctx_xdk_window_has_focus(void)
return true;
}
static void gfx_ctx_xdk_update_window_title(void) { }
static void gfx_ctx_xdk_update_window_title(void)
{
char buf[128];
gfx_get_fps(buf, sizeof(buf), false);
}
static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height)
{

View File

@ -1520,9 +1520,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
gl_render_overlay(gl);
#endif
#if !defined(RARCH_CONSOLE)
context_update_window_title_func();
#endif
RARCH_PERFORMANCE_STOP(frame_run);

View File

@ -910,6 +910,7 @@ static bool gx_frame(void *data, const void *frame,
g_draw_done = false;
g_current_framebuf ^= 1;
if (frame)
{
if (gx->rgb32)
@ -970,6 +971,9 @@ static bool gx_frame(void *data, const void *frame,
clear_efb = GX_TRUE;
}
char buf[128];
gfx_get_fps(buf, sizeof(buf), false);
GX_CopyDisp(g_framebuf[g_current_framebuf], clear_efb);
GX_Flush();
VIDEO_SetNextFramebuffer(g_framebuf[g_current_framebuf]);

View File

@ -1038,6 +1038,8 @@ NULL, NULL, NULL, 0);
d3d->font_ctx->render_msg(d3d, msg, &font_parms);
}
context_update_window_title_func();
gfx_ctx_xdk_swap_buffers();
g_extern.frame_count++;