diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index 760a616d99..39dc605a36 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -198,6 +198,9 @@ static void gfx_ctx_update_window_title(void) { char buf[128], buf_fps[128]; gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) + msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } static bool gfx_ctx_set_video_mode( diff --git a/gfx/context/drm_egl_ctx.c b/gfx/context/drm_egl_ctx.c index 02a9bebb05..0aa52299cb 100644 --- a/gfx/context/drm_egl_ctx.c +++ b/gfx/context/drm_egl_ctx.c @@ -217,6 +217,9 @@ static void gfx_ctx_update_window_title(void) { char buf[128], buf_fps[128]; gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) + msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) diff --git a/gfx/context/emscriptenegl_ctx.c b/gfx/context/emscriptenegl_ctx.c index 271938e1be..b7ad20d821 100644 --- a/gfx/context/emscriptenegl_ctx.c +++ b/gfx/context/emscriptenegl_ctx.c @@ -83,8 +83,10 @@ static void gfx_ctx_set_resize(unsigned width, unsigned height) static void gfx_ctx_update_window_title(void) { char buf[128], buf_fps[128]; - if (gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)) - RARCH_LOG("%s\n", buf); + gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) + msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) diff --git a/gfx/context/glx_ctx.c b/gfx/context/glx_ctx.c index 7fc15f0ee0..e1228a113b 100644 --- a/gfx/context/glx_ctx.c +++ b/gfx/context/glx_ctx.c @@ -165,13 +165,11 @@ static void gfx_ctx_set_resize(unsigned width, unsigned height) static void gfx_ctx_update_window_title(void) { - gl_t *gl = (gl_t*)driver.video_data; char buf[128], buf_fps[128]; if (gfx_get_fps(buf, sizeof(buf), true, buf_fps, sizeof(buf_fps))) XStoreName(g_dpy, g_win, buf); - if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) && - gl->font_ctx) + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } diff --git a/gfx/context/ps3_ctx.c b/gfx/context/ps3_ctx.c index 6715517543..9b330002df 100644 --- a/gfx/context/ps3_ctx.c +++ b/gfx/context/ps3_ctx.c @@ -188,20 +188,12 @@ static void gfx_ctx_set_resize(unsigned width, unsigned height) { } static void gfx_ctx_update_window_title(void) { - gl_t *gl = (gl_t*)driver.video_data; char buf[128], buf_fps[128]; - if (gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)) && - (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) && - gl->font_ctx) - { - font_params_t params = {0}; - params.x = g_settings.video.msg_pos_x; - params.y = 0.56f; - params.scale = 1.04f; - params.color = WHITE; - gl->font_ctx->render_msg(gl, buf, ¶ms); - } + gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) + msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) diff --git a/gfx/context/vc_egl_ctx.c b/gfx/context/vc_egl_ctx.c index 1494f02e60..e5d0affc8a 100644 --- a/gfx/context/vc_egl_ctx.c +++ b/gfx/context/vc_egl_ctx.c @@ -111,6 +111,9 @@ static void gfx_ctx_update_window_title(void) { char buf[128], buf_fps[128] gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps)); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) + msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) diff --git a/gfx/context/wgl_ctx.c b/gfx/context/wgl_ctx.c index 709168c3d5..d3b09aaa72 100644 --- a/gfx/context/wgl_ctx.c +++ b/gfx/context/wgl_ctx.c @@ -280,6 +280,9 @@ static void gfx_ctx_update_window_title(void) char buf[128], buf_fps[128]; if (gfx_get_fps(buf, sizeof(buf), false, buf_fps, sizeof(buf_fps))) SetWindowText(g_hwnd, buf); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))) + msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); } static void gfx_ctx_get_video_size(unsigned *width, unsigned *height)