mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Cleanups
This commit is contained in:
parent
cdff2a2c3c
commit
416363e9fd
@ -897,11 +897,13 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
&& !video_info->runloop_is_slowmotion
|
&& !video_info->runloop_is_slowmotion
|
||||||
&& !video_info->runloop_is_paused)
|
&& !video_info->runloop_is_paused)
|
||||||
{
|
{
|
||||||
|
if (gl1->ctx_driver->swap_buffers)
|
||||||
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (gl1->ctx_driver->swap_buffers)
|
||||||
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
|
||||||
|
|
||||||
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
||||||
|
@ -1982,10 +1982,12 @@ static bool gl_core_frame(void *data, const void *frame,
|
|||||||
&& !runloop_is_slowmotion
|
&& !runloop_is_slowmotion
|
||||||
&& !runloop_is_paused)
|
&& !runloop_is_paused)
|
||||||
{
|
{
|
||||||
|
if (gl->ctx_driver->swap_buffers)
|
||||||
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gl->ctx_driver->swap_buffers)
|
||||||
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
gl->ctx_driver->swap_buffers(gl->ctx_data);
|
||||||
|
|
||||||
if (video_info->hard_sync &&
|
if (video_info->hard_sync &&
|
||||||
|
@ -451,6 +451,7 @@ static bool vg_frame(void *data, const void *frame,
|
|||||||
if (vg->ctx_driver->update_window_title)
|
if (vg->ctx_driver->update_window_title)
|
||||||
vg->ctx_driver->update_window_title(vg->ctx_data);
|
vg->ctx_driver->update_window_title(vg->ctx_data);
|
||||||
|
|
||||||
|
if (vg->ctx_driver->swap_buffers)
|
||||||
vg->ctx_driver->swap_buffers(vg->ctx_data);
|
vg->ctx_driver->swap_buffers(vg->ctx_data);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1695,6 +1695,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info,
|
|||||||
slock_unlock(vk->context->queue_lock);
|
slock_unlock(vk->context->queue_lock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (vk->ctx_driver->swap_buffers)
|
||||||
vk->ctx_driver->swap_buffers(context_data);
|
vk->ctx_driver->swap_buffers(context_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2221,6 +2222,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
|||||||
slock_unlock(vk->context->queue_lock);
|
slock_unlock(vk->context->queue_lock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (vk->ctx_driver->swap_buffers)
|
||||||
vk->ctx_driver->swap_buffers(vk->ctx_data);
|
vk->ctx_driver->swap_buffers(vk->ctx_data);
|
||||||
|
|
||||||
if (!vk->context->swap_interval_emulation_lock)
|
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 */
|
/* 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,
|
static bool get_metrics_null(void *data, enum display_metric_types type,
|
||||||
float *value) { return false; }
|
float *value) { return false; }
|
||||||
static bool set_resize_null(void *a, unsigned b, unsigned c) { 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)
|
if (!p_rarch->current_video_context.get_metrics)
|
||||||
p_rarch->current_video_context.get_metrics = get_metrics_null;
|
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)
|
if (!p_rarch->current_video_context.set_resize)
|
||||||
p_rarch->current_video_context.set_resize = set_resize_null;
|
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)
|
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_video_output_next = NULL;
|
||||||
p_rarch->current_video_context.get_metrics = get_metrics_null;
|
p_rarch->current_video_context.get_metrics = get_metrics_null;
|
||||||
p_rarch->current_video_context.translate_aspect = 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.check_window = NULL;
|
||||||
p_rarch->current_video_context.set_resize = set_resize_null;
|
p_rarch->current_video_context.set_resize = set_resize_null;
|
||||||
p_rarch->current_video_context.suppress_screensaver = 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.input_driver = NULL;
|
||||||
p_rarch->current_video_context.get_proc_address = NULL;
|
p_rarch->current_video_context.get_proc_address = NULL;
|
||||||
p_rarch->current_video_context.image_buffer_init = NULL;
|
p_rarch->current_video_context.image_buffer_init = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user