diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index 3f5f8549b4..37fabae169 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -793,9 +793,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, menu_driver_frame(video_info); #endif - video_info->cb_update_window_title( - video_info->context_data); - /* Update main surface: locate free page, blit and flip. */ drm_surface_update(_drmvars, frame, _drmvars->main_surface); return true; diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 43f5b06508..66c19dca30 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -349,7 +349,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, InvalidateRect(hwnd, NULL, false); - video_info->cb_update_window_title( + gdi->ctx_driver->update_window_title( video_info->context_data); return true; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 6abbfef78e..333c920d6a 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -3060,8 +3060,8 @@ static bool gl2_frame(void *data, const void *frame, font_driver_render_msg(gl, msg, NULL, NULL); } - if (video_info->cb_update_window_title) - video_info->cb_update_window_title(context_data); + if (gl->ctx_driver->update_window_title) + gl->ctx_driver->update_window_title(context_data); /* Reset state which could easily mess up libretro core. */ if (gl->hw_render_fbo_init) @@ -3095,12 +3095,13 @@ static bool gl2_frame(void *data, const void *frame, && !runloop_is_slowmotion && !runloop_is_paused) { - video_info->cb_swap_buffers(context_data); + if (gl->ctx_driver->swap_buffers) + gl->ctx_driver->swap_buffers(context_data); glClear(GL_COLOR_BUFFER_BIT); } #endif - video_info->cb_swap_buffers(context_data); + gl->ctx_driver->swap_buffers(context_data); /* check if we are fast forwarding or in menu, if we are ignore hard sync */ if ( gl->have_sync diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index de200fad08..e7b3c9225a 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -869,7 +869,7 @@ static bool gl1_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(gl1, msg, NULL, NULL); - video_info->cb_update_window_title( + gl1->ctx_driver->update_window_title( video_info->context_data); /* Screenshots. */ @@ -888,12 +888,12 @@ static bool gl1_gfx_frame(void *data, const void *frame, && !video_info->runloop_is_slowmotion && !video_info->runloop_is_paused) { - video_info->cb_swap_buffers(video_info->context_data); + gl1->ctx_driver->swap_buffers(video_info->context_data); glClear(GL_COLOR_BUFFER_BIT); } #endif - video_info->cb_swap_buffers(video_info->context_data); + gl1->ctx_driver->swap_buffers(video_info->context_data); /* check if we are fast forwarding or in menu, if we are ignore hard sync */ if (video_info->hard_sync diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c index e63844f8db..7907965e48 100644 --- a/gfx/drivers/gl_core.c +++ b/gfx/drivers/gl_core.c @@ -1949,7 +1949,7 @@ static bool gl_core_frame(void *data, const void *frame, font_driver_render_msg(gl, msg, NULL, NULL); } - video_info->cb_update_window_title(context_data); + gl->ctx_driver->update_window_title(context_data); if (gl->readback_buffer_screenshot) { @@ -1973,11 +1973,11 @@ static bool gl_core_frame(void *data, const void *frame, && !runloop_is_slowmotion && !runloop_is_paused) { - video_info->cb_swap_buffers(context_data); + gl->ctx_driver->swap_buffers(context_data); glClear(GL_COLOR_BUFFER_BIT); } - video_info->cb_swap_buffers(context_data); + gl->ctx_driver->swap_buffers(context_data); if (video_info->hard_sync && !input_driver_nonblock_state && diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index c452ee433f..5bcc06b8ce 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -454,9 +454,8 @@ static bool vg_frame(void *data, const void *frame, vg_draw_message(vg, msg); #endif - video_info->cb_update_window_title( - video_info->context_data); - video_info->cb_swap_buffers(video_info->context_data); + vg->ctx_driver->update_window_title(video_info->context_data); + vg->ctx_driver->swap_buffers(video_info->context_data); return true; } diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index 4a3c2c3b64..3299512ceb 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -229,9 +229,6 @@ static bool vga_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(data, msg, NULL, NULL); - video_info->cb_update_window_title( - video_info->context_data); - return true; } diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 1cee5d5b93..7f04a70ba9 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1659,7 +1659,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info, slock_unlock(vk->context->queue_lock); #endif - video_info->cb_swap_buffers(context_data); + vk->ctx_driver->swap_buffers(context_data); } static bool vulkan_frame(void *data, const void *frame, @@ -2116,10 +2116,10 @@ static bool vulkan_frame(void *data, const void *frame, slock_unlock(vk->context->queue_lock); #endif - video_info->cb_swap_buffers(context_data); + vk->ctx_driver->swap_buffers(context_data); if (!vk->context->swap_interval_emulation_lock) - video_info->cb_update_window_title(context_data); + vk->ctx_driver->update_window_title(context_data); /* Handle spurious swapchain invalidations as soon as we can, * i.e. right after swap buffers. */ diff --git a/retroarch.c b/retroarch.c index b48ce9ee59..bc39504982 100644 --- a/retroarch.c +++ b/retroarch.c @@ -24141,9 +24141,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->input_driver_nonblock_state = input_driver_nonblock_state; video_info->context_data = video_context_data; - video_info->cb_update_window_title = current_video_context.update_window_title; video_info->cb_swap_buffers = current_video_context.swap_buffers; - video_info->cb_get_metrics = current_video_context.get_metrics; video_info->cb_set_resize = current_video_context.set_resize; video_info->userdata = video_driver_get_ptr_internal(false); diff --git a/retroarch.h b/retroarch.h index 626ff54a71..d528affdd2 100644 --- a/retroarch.h +++ b/retroarch.h @@ -1186,10 +1186,7 @@ typedef struct video_frame_info enum text_alignment text_align; } osd_stat_params; - void (*cb_update_window_title)(void*); void (*cb_swap_buffers)(void*); - bool (*cb_get_metrics)(void *data, enum display_metric_types type, - float *value); bool (*cb_set_resize)(void*, unsigned, unsigned); void *context_data;