Refactor some functions

This commit is contained in:
twinaphex 2017-01-23 15:24:33 +01:00
parent 400d4f1684
commit fb84259742

View File

@ -397,24 +397,24 @@ const video_poke_interface_t *video_driver_get_poke(void)
**/
uintptr_t video_driver_get_current_framebuffer(void)
{
if (!video_driver_poke || !video_driver_poke->get_current_framebuffer)
return 0;
return video_driver_poke->get_current_framebuffer(video_driver_data);
if (video_driver_poke && video_driver_poke->get_current_framebuffer)
return video_driver_poke->get_current_framebuffer(video_driver_data);
return 0;
}
retro_proc_address_t video_driver_get_proc_address(const char *sym)
{
if (!video_driver_poke || !video_driver_poke->get_proc_address)
return NULL;
return video_driver_poke->get_proc_address(video_driver_data, sym);
if (video_driver_poke && video_driver_poke->get_proc_address)
return video_driver_poke->get_proc_address(video_driver_data, sym);
return NULL;
}
bool video_driver_set_shader(enum rarch_shader_type type,
const char *path)
{
if (!current_video->set_shader)
return false;
return current_video->set_shader(video_driver_data, type, path);
if (current_video->set_shader)
return current_video->set_shader(video_driver_data, type, path);
return false;
}
static void deinit_video_filter(void)