Get rid of cb_set_resize

This commit is contained in:
twinaphex 2020-07-09 05:36:29 +02:00
parent e10f4eed8d
commit f6c4890063
6 changed files with 10 additions and 7 deletions

View file

@ -2865,7 +2865,8 @@ static bool gl2_frame(void *data, const void *frame,
if (gl->should_resize)
{
video_info->cb_set_resize(context_data,
if (gl->ctx_driver->set_resize)
gl->ctx_driver->set_resize(context_data,
width, height);
gl->should_resize = false;

View file

@ -720,8 +720,9 @@ static bool gl1_gfx_frame(void *data, const void *frame,
mode.width = width;
mode.height = height;
video_info->cb_set_resize(video_info->context_data,
mode.width, mode.height);
if (gl1->ctx_driver->set_resize)
gl1->ctx_driver->set_resize(video_info->context_data,
mode.width, mode.height);
gl1_gfx_set_viewport(gl1,
video_width, video_height, false, true);

View file

@ -1877,7 +1877,9 @@ static bool gl_core_frame(void *data, const void *frame,
if (gl->should_resize)
{
video_info->cb_set_resize(context_data, width, height);
if (gl->ctx_driver->set_resize)
gl->ctx_driver->set_resize(context_data,
width, height);
gl->should_resize = false;
}

View file

@ -2241,7 +2241,8 @@ static bool vulkan_frame(void *data, const void *frame,
mode.width = width;
mode.height = height;
video_info->cb_set_resize(context_data, mode.width, mode.height);
if (vk->ctx_driver->set_resize)
vk->ctx_driver->set_resize(context_data, mode.width, mode.height);
vk->should_resize = false;
}

View file

@ -32694,7 +32694,6 @@ void video_driver_build_info(video_frame_info_t *video_info)
video_info->input_driver_nonblock_state = p_rarch->input_driver_nonblock_state;
video_info->context_data = p_rarch->video_context_data;
video_info->cb_swap_buffers = p_rarch->current_video_context.swap_buffers;
video_info->cb_set_resize = p_rarch->current_video_context.set_resize;
video_info->userdata = VIDEO_DRIVER_GET_PTR_INTERNAL(false);

View file

@ -1198,7 +1198,6 @@ typedef struct video_frame_info
} osd_stat_params;
void (*cb_swap_buffers)(void*);
bool (*cb_set_resize)(void*, unsigned, unsigned);
void *context_data;
void *userdata;