From f6c8aba119d4addc0894e67b2ce3e84a0cac52eb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 13 May 2017 18:58:13 +0200 Subject: [PATCH] Move video_context_driver_update_window_title to video_driver_frame --- gfx/drivers/d3d.cpp | 2 -- gfx/drivers/gdi_gfx.c | 2 -- gfx/drivers/gl.c | 2 -- gfx/drivers/vg.c | 2 -- gfx/drivers/vga_gfx.c | 2 -- gfx/drivers/vulkan.c | 5 ----- gfx/video_driver.c | 3 +++ gfx/video_driver.h | 4 ---- 8 files changed, 3 insertions(+), 19 deletions(-) diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index d394c5d287..7dd0ad8bc4 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -1471,8 +1471,6 @@ static bool d3d_frame(void *data, const void *frame, } #endif - video_context_driver_update_window_title(video_info); - video_context_driver_swap_buffers(video_info); return true; diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index f8bba30c03..34e370052c 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -272,8 +272,6 @@ static bool gdi_gfx_frame(void *data, const void *frame, InvalidateRect(hwnd, NULL, false); - video_context_driver_update_window_title(video_info); - return true; } diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index fcc51031d1..ea039a725c 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1272,8 +1272,6 @@ static bool gl_frame(void *data, const void *frame, gl_render_overlay(gl, video_info); #endif - video_context_driver_update_window_title(video_info); - #ifdef HAVE_FBO /* Reset state which could easily mess up libretro core. */ if (gl->hw_render_fbo_init) diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 157c1c232f..b95089973b 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -422,8 +422,6 @@ static bool vg_frame(void *data, const void *frame, vg_draw_message(vg, msg); #endif - video_context_driver_update_window_title(video_info); - video_context_driver_swap_buffers(video_info); return true; diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index f5351cb009..6040eeea35 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -244,8 +244,6 @@ static bool vga_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(video_info, NULL, msg, NULL); - video_context_driver_update_window_title(video_info); - return true; } diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 2902ec3912..ca89afab7c 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1936,13 +1936,8 @@ static bool vulkan_frame(void *data, const void *frame, slock_unlock(vk->context->queue_lock); #endif - video_context_driver_swap_buffers(video_info); - - if (!vk->context->swap_interval_emulation_lock) - video_context_driver_update_window_title(video_info); - /* Handle spurious swapchain invalidations as soon as we can, * i.e. right after swap buffers. */ if (vk->should_resize) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 96ee681a97..d805914d9f 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2267,6 +2267,9 @@ void video_driver_frame(const void *data, unsigned width, if (video_info.fps_show) runloop_msg_queue_push(video_info.fps_text, 1, 1, false); + + if (current_video_context && current_video_context->update_window_title) + current_video_context->update_window_title(video_context_data, &video_info); } void video_driver_display_type_set(enum rarch_display_type type) diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 6797492fd1..ae2175ea51 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -906,10 +906,6 @@ bool video_context_driver_set(const gfx_ctx_driver_t *data); void video_context_driver_destroy(void); -#define video_context_driver_update_window_title(video_info) \ - if (current_video_context && current_video_context->update_window_title) \ - current_video_context->update_window_title(video_context_data, video_info) - #define video_context_driver_swap_buffers(video_info) \ if (current_video_context && current_video_context->swap_buffers) \ current_video_context->swap_buffers(video_context_data, video_info)