From d514963a95290b63b04cc4ab7d5aeeee3461c248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Wed, 3 Aug 2016 02:02:44 +0200 Subject: [PATCH] (VITA) Show fps --- gfx/drivers/vita2d_gfx.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 0aec9379f3..a9e5c58710 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -167,6 +167,8 @@ static bool vita2d_gfx_frame(void *data, const void *frame, { void *tex_p; vita_video_t *vita = (vita_video_t *)data; + settings_t *settings = config_get_ptr(); + (void)frame; (void)width; @@ -225,7 +227,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame, vita2d_start_drawing(); vita2d_clear_screen(); - + if (vita->texture) { if (vita->fullscreen) @@ -243,6 +245,15 @@ static bool vita2d_gfx_frame(void *data, const void *frame, vita->vp.y, scalex, scaley, rad); } } + + if (settings->fps_show) + { + char buffer[128] = {0}; + char buffer_fps[128] = {0}; + video_monitor_get_fps(buffer, sizeof(buffer), + settings->fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); + runloop_msg_queue_push(buffer_fps, 1, 1, false); + } #ifdef HAVE_OVERLAY if (vita->overlay_enable)