Take out cb_update_window_title and cb_get_metrics

This commit is contained in:
twinaphex 2020-03-28 05:36:31 +01:00
parent 5972ed9cc6
commit 19c68fad43
10 changed files with 17 additions and 28 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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 &&

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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. */

View File

@ -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);

View File

@ -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;