From 80079e297b8e5e12a3c07704f730ef95f4909a5c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 7 Oct 2013 17:11:48 +0200 Subject: [PATCH] (GLX) Hook up preliminary onscreen FPS (enabled by setting "Debug Info Messages" in RGUI to ON --- gfx/context/glx_ctx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gfx/context/glx_ctx.c b/gfx/context/glx_ctx.c index cc64267351..73f2ce9c43 100644 --- a/gfx/context/glx_ctx.c +++ b/gfx/context/glx_ctx.c @@ -165,9 +165,14 @@ 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]; - if (gfx_get_fps(buf, sizeof(buf), false)) + if (gfx_get_fps(buf, sizeof(buf), true)) XStoreName(g_dpy, g_win, buf); + + if ((g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) && + gl->font_ctx) + msg_queue_push(g_extern.msg_queue, buf, 1, 1); } static void gfx_ctx_get_video_size(unsigned *width, unsigned *height)