mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Cleanups
This commit is contained in:
parent
1dcef5e429
commit
2dcf79bb4e
@ -268,40 +268,40 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data,
|
||||
|
||||
bool video_context_driver_check_window(gfx_ctx_size_t *size_data)
|
||||
{
|
||||
uint64_t *frame_count = NULL;
|
||||
frame_count = video_driver_get_frame_count_ptr();
|
||||
if ( video_context_data
|
||||
&& size_data
|
||||
&& current_video_context
|
||||
&& current_video_context->check_window)
|
||||
{
|
||||
current_video_context->check_window(video_context_data,
|
||||
size_data->quit,
|
||||
size_data->resize,
|
||||
size_data->width,
|
||||
size_data->height, ((unsigned int)*video_driver_get_frame_count_ptr()));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!video_context_data || !size_data)
|
||||
return false;
|
||||
if (!current_video_context || !current_video_context->check_window)
|
||||
return false;
|
||||
|
||||
current_video_context->check_window(video_context_data,
|
||||
size_data->quit,
|
||||
size_data->resize,
|
||||
size_data->width,
|
||||
size_data->height, (unsigned int)*frame_count);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_context_driver_init_image_buffer(const video_info_t *data)
|
||||
{
|
||||
if (!current_video_context || !current_video_context->image_buffer_init)
|
||||
return false;
|
||||
if (!current_video_context->image_buffer_init(video_context_data, data))
|
||||
return false;
|
||||
return true;
|
||||
if ( current_video_context
|
||||
&& current_video_context->image_buffer_init
|
||||
&& current_video_context->image_buffer_init(video_context_data, data))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_context_driver_write_to_image_buffer(gfx_ctx_image_t *img)
|
||||
{
|
||||
if (!current_video_context || !current_video_context->image_buffer_write)
|
||||
return false;
|
||||
if (!current_video_context->image_buffer_write(video_context_data,
|
||||
if ( current_video_context
|
||||
&& current_video_context->image_buffer_write
|
||||
&& current_video_context->image_buffer_write(video_context_data,
|
||||
img->frame, img->width, img->height, img->pitch,
|
||||
img->rgb32, img->index, img->handle))
|
||||
return false;
|
||||
return true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_context_driver_get_video_output_prev(void)
|
||||
@ -399,13 +399,13 @@ bool video_context_driver_get_proc_address(gfx_ctx_proc_address_t *proc)
|
||||
|
||||
bool video_context_driver_get_metrics(gfx_ctx_metrics_t *metrics)
|
||||
{
|
||||
if (!current_video_context || !current_video_context->get_metrics)
|
||||
return false;
|
||||
if (!current_video_context->get_metrics(video_context_data,
|
||||
if ( current_video_context
|
||||
&& current_video_context->get_metrics
|
||||
&& current_video_context->get_metrics(video_context_data,
|
||||
metrics->type,
|
||||
metrics->value))
|
||||
return false;
|
||||
return true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_context_driver_input_driver(gfx_ctx_input_t *inp)
|
||||
@ -419,12 +419,12 @@ bool video_context_driver_input_driver(gfx_ctx_input_t *inp)
|
||||
|
||||
bool video_context_driver_suppress_screensaver(bool *bool_data)
|
||||
{
|
||||
if (!video_context_data || !current_video_context)
|
||||
return false;
|
||||
if (!current_video_context->suppress_screensaver(
|
||||
if ( video_context_data
|
||||
&& current_video_context
|
||||
&& current_video_context->suppress_screensaver(
|
||||
video_context_data, *bool_data))
|
||||
return false;
|
||||
return true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_context_driver_get_ident(gfx_ctx_ident_t *ident)
|
||||
|
Loading…
x
Reference in New Issue
Block a user