From c0e55cba37f69cf3ef123a8566b62c4d0b9539bd Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 19 Jan 2017 17:51:22 +0000 Subject: [PATCH] window title fix for SDL --- gfx/drivers/sdl_gfx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 402ae86278..422a0688ac 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -341,10 +341,15 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, { static struct retro_perf_counter sdl_scale = {0}; sdl_video_t *vid = (sdl_video_t*)data; + char title[128]; if (!frame) return true; + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + if (SDL_MUSTLOCK(vid->screen)) SDL_LockSurface(vid->screen); @@ -377,8 +382,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, if (SDL_MUSTLOCK(vid->screen)) SDL_UnlockSurface(vid->screen); - if (video_info->monitor_fps_enable) - SDL_WM_SetCaption(video_info->window_text, NULL); + if (title[0]) + SDL_WM_SetCaption(title, NULL); SDL_Flip(vid->screen);