mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-24 19:56:06 +00:00
Do away with conditional inside build_info
This commit is contained in:
parent
cb2e898d8c
commit
c5485152aa
@ -121,6 +121,8 @@ typedef struct video_pixel_scaler
|
|||||||
void *scaler_out;
|
void *scaler_out;
|
||||||
} video_pixel_scaler_t;
|
} video_pixel_scaler_t;
|
||||||
|
|
||||||
|
void (*video_driver_cb_shader_use)(void *data, void *shader_data, unsigned index, bool set_active);
|
||||||
|
|
||||||
/* Opaque handles to currently running window.
|
/* Opaque handles to currently running window.
|
||||||
* Used by e.g. input drivers which bind to a window.
|
* Used by e.g. input drivers which bind to a window.
|
||||||
* Drivers are responsible for setting these if an input driver
|
* Drivers are responsible for setting these if an input driver
|
||||||
@ -2512,11 +2514,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
|||||||
video_info->cb_get_metrics = current_video_context.get_metrics;
|
video_info->cb_get_metrics = current_video_context.get_metrics;
|
||||||
video_info->cb_set_resize = current_video_context.set_resize;
|
video_info->cb_set_resize = current_video_context.set_resize;
|
||||||
|
|
||||||
if (current_shader)
|
video_info->cb_shader_use = video_driver_cb_shader_use;
|
||||||
video_info->cb_shader_use = current_shader->use;
|
|
||||||
|
|
||||||
if (!video_info->cb_shader_use)
|
|
||||||
video_info->cb_shader_use = video_shader_driver_use_null;
|
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
video_driver_threaded_unlock(is_threaded);
|
video_driver_threaded_unlock(is_threaded);
|
||||||
@ -3194,8 +3192,13 @@ static void video_shader_driver_reset_to_defaults(void)
|
|||||||
current_shader->set_mvp = video_shader_driver_set_mvp_null;
|
current_shader->set_mvp = video_shader_driver_set_mvp_null;
|
||||||
if (!current_shader->set_coords)
|
if (!current_shader->set_coords)
|
||||||
current_shader->set_coords = video_shader_driver_set_coords_null;
|
current_shader->set_coords = video_shader_driver_set_coords_null;
|
||||||
if (!current_shader->use)
|
if (current_shader->use)
|
||||||
|
video_driver_cb_shader_use = current_shader->use;
|
||||||
|
else
|
||||||
|
{
|
||||||
current_shader->use = video_shader_driver_use_null;
|
current_shader->use = video_shader_driver_use_null;
|
||||||
|
video_driver_cb_shader_use = video_shader_driver_use_null;
|
||||||
|
}
|
||||||
if (!current_shader->set_params)
|
if (!current_shader->set_params)
|
||||||
current_shader->set_params = video_shader_driver_set_params_null;
|
current_shader->set_params = video_shader_driver_set_params_null;
|
||||||
if (!current_shader->shader_scale)
|
if (!current_shader->shader_scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user