mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Cleanups
This commit is contained in:
parent
cdff2a2c3c
commit
416363e9fd
@ -897,12 +897,14 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
&& !video_info->runloop_is_slowmotion
|
||||
&& !video_info->runloop_is_paused)
|
||||
{
|
||||
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
||||
if (gl1->ctx_driver->swap_buffers)
|
||||
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
#endif
|
||||
|
||||
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
||||
if (gl1->ctx_driver->swap_buffers)
|
||||
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
||||
|
||||
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
||||
if (video_info->hard_sync
|
||||
|
@ -1982,11 +1982,13 @@ static bool gl_core_frame(void *data, const void *frame,
|
||||
&& !runloop_is_slowmotion
|
||||
&& !runloop_is_paused)
|
||||
{
|
||||
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
||||
if (gl->ctx_driver->swap_buffers)
|
||||
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
||||
if (gl->ctx_driver->swap_buffers)
|
||||
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
||||
|
||||
if (video_info->hard_sync &&
|
||||
!input_driver_nonblock_state &&
|
||||
|
@ -451,7 +451,8 @@ static bool vg_frame(void *data, const void *frame,
|
||||
if (vg->ctx_driver->update_window_title)
|
||||
vg->ctx_driver->update_window_title(vg->ctx_data);
|
||||
|
||||
vg->ctx_driver->swap_buffers(vg->ctx_data);
|
||||
if (vg->ctx_driver->swap_buffers)
|
||||
vg->ctx_driver->swap_buffers(vg->ctx_data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1695,7 +1695,8 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info,
|
||||
slock_unlock(vk->context->queue_lock);
|
||||
#endif
|
||||
|
||||
vk->ctx_driver->swap_buffers(context_data);
|
||||
if (vk->ctx_driver->swap_buffers)
|
||||
vk->ctx_driver->swap_buffers(context_data);
|
||||
}
|
||||
|
||||
static bool vulkan_frame(void *data, const void *frame,
|
||||
@ -2221,7 +2222,8 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
slock_unlock(vk->context->queue_lock);
|
||||
#endif
|
||||
|
||||
vk->ctx_driver->swap_buffers(vk->ctx_data);
|
||||
if (vk->ctx_driver->swap_buffers)
|
||||
vk->ctx_driver->swap_buffers(vk->ctx_data);
|
||||
|
||||
if (!vk->context->swap_interval_emulation_lock)
|
||||
{
|
||||
|
12
retroarch.c
12
retroarch.c
@ -30784,8 +30784,6 @@ bool video_driver_started_fullscreen(void)
|
||||
|
||||
/* Stub functions */
|
||||
|
||||
static void update_window_title_null(void *data) { }
|
||||
static void swap_buffers_null(void *data) { }
|
||||
static bool get_metrics_null(void *data, enum display_metric_types type,
|
||||
float *value) { return false; }
|
||||
static bool set_resize_null(void *a, unsigned b, unsigned c) { return false; }
|
||||
@ -30894,14 +30892,8 @@ static void video_context_driver_reset(void)
|
||||
if (!p_rarch->current_video_context.get_metrics)
|
||||
p_rarch->current_video_context.get_metrics = get_metrics_null;
|
||||
|
||||
if (!p_rarch->current_video_context.update_window_title)
|
||||
p_rarch->current_video_context.update_window_title = update_window_title_null;
|
||||
|
||||
if (!p_rarch->current_video_context.set_resize)
|
||||
p_rarch->current_video_context.set_resize = set_resize_null;
|
||||
|
||||
if (!p_rarch->current_video_context.swap_buffers)
|
||||
p_rarch->current_video_context.swap_buffers = swap_buffers_null;
|
||||
}
|
||||
|
||||
bool video_context_driver_set(const gfx_ctx_driver_t *data)
|
||||
@ -30929,11 +30921,11 @@ void video_context_driver_destroy(void)
|
||||
p_rarch->current_video_context.get_video_output_next = NULL;
|
||||
p_rarch->current_video_context.get_metrics = get_metrics_null;
|
||||
p_rarch->current_video_context.translate_aspect = NULL;
|
||||
p_rarch->current_video_context.update_window_title = update_window_title_null;
|
||||
p_rarch->current_video_context.update_window_title = NULL;
|
||||
p_rarch->current_video_context.check_window = NULL;
|
||||
p_rarch->current_video_context.set_resize = set_resize_null;
|
||||
p_rarch->current_video_context.suppress_screensaver = NULL;
|
||||
p_rarch->current_video_context.swap_buffers = swap_buffers_null;
|
||||
p_rarch->current_video_context.swap_buffers = NULL;
|
||||
p_rarch->current_video_context.input_driver = NULL;
|
||||
p_rarch->current_video_context.get_proc_address = NULL;
|
||||
p_rarch->current_video_context.image_buffer_init = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user