Try to prevent a NULL pointer dereference for global - rename video_frame

This commit is contained in:
twinaphex 2015-12-04 00:26:09 +01:00
parent 0e15c30964
commit b6be555809
3 changed files with 7 additions and 11 deletions

View File

@ -1803,7 +1803,7 @@ static bool video_pixel_frame_scale(const void *data,
} }
/** /**
* video_frame: * video_driver_frame:
* @data : pointer to data of the video frame. * @data : pointer to data of the video frame.
* @width : width of the video frame. * @width : width of the video frame.
* @height : height of the video frame. * @height : height of the video frame.
@ -1811,7 +1811,7 @@ static bool video_pixel_frame_scale(const void *data,
* *
* Video frame render callback function. * Video frame render callback function.
**/ **/
void video_frame(const void *data, unsigned width, void video_driver_frame(const void *data, unsigned width,
unsigned height, size_t pitch) unsigned height, size_t pitch)
{ {
unsigned output_width = 0; unsigned output_width = 0;
@ -1842,7 +1842,7 @@ void video_frame(const void *data, unsigned width,
!video_driver_state.filter.filter !video_driver_state.filter.filter
|| !settings->video.post_filter_record || !settings->video.post_filter_record
|| !data || !data
|| global->record.gpu_buffer || global && global->record.gpu_buffer
) )
) )
recording_dump_frame(data, width, height, pitch); recording_dump_frame(data, width, height, pitch);

View File

@ -448,10 +448,6 @@ void video_driver_cached_frame_get(const void **data, unsigned *width,
void video_driver_menu_settings(void **list_data, void *list_info_data, void video_driver_menu_settings(void **list_data, void *list_info_data,
void *group_data, void *subgroup_data, const char *parent_group); void *group_data, void *subgroup_data, const char *parent_group);
void video_driver_frame(const void *data,
unsigned width, unsigned height,
size_t pitch, const char *msg);
/** /**
* video_viewport_get_scaled_integer: * video_viewport_get_scaled_integer:
* @vp : Viewport handle * @vp : Viewport handle
@ -518,7 +514,7 @@ unsigned video_pixel_get_alignment(unsigned pitch);
const video_poke_interface_t *video_driver_get_poke(void); const video_poke_interface_t *video_driver_get_poke(void);
/** /**
* video_frame: * video_driver_frame:
* @data : pointer to data of the video frame. * @data : pointer to data of the video frame.
* @width : width of the video frame. * @width : width of the video frame.
* @height : height of the video frame. * @height : height of the video frame.
@ -526,7 +522,7 @@ const video_poke_interface_t *video_driver_get_poke(void);
* *
* Video frame render callback function. * Video frame render callback function.
**/ **/
void video_frame(const void *data, unsigned width, void video_driver_frame(const void *data, unsigned width,
unsigned height, size_t pitch); unsigned height, size_t pitch);
uintptr_t video_driver_display_get(void); uintptr_t video_driver_display_get(void);

View File

@ -47,7 +47,7 @@ void retro_set_default_callbacks(void *data)
if (!cbs) if (!cbs)
return; return;
cbs->frame_cb = video_frame; cbs->frame_cb = video_driver_frame;
cbs->sample_cb = audio_driver_sample; cbs->sample_cb = audio_driver_sample;
cbs->sample_batch_cb = audio_driver_sample_batch; cbs->sample_batch_cb = audio_driver_sample_batch;
cbs->state_cb = input_state; cbs->state_cb = input_state;
@ -73,7 +73,7 @@ void retro_init_libretro_cbs(void *data)
(void)driver; (void)driver;
(void)global; (void)global;
core.retro_set_video_refresh(video_frame); core.retro_set_video_refresh(video_driver_frame);
core.retro_set_audio_sample(audio_driver_sample); core.retro_set_audio_sample(audio_driver_sample);
core.retro_set_audio_sample_batch(audio_driver_sample_batch); core.retro_set_audio_sample_batch(audio_driver_sample_batch);
core.retro_set_input_state(input_state); core.retro_set_input_state(input_state);