driver.c - cleanups

This commit is contained in:
twinaphex 2014-08-02 13:44:36 +02:00
parent e110bd90f5
commit ea64ea465a

View File

@ -457,24 +457,21 @@ bool driver_set_rumble_state(unsigned port, enum retro_rumble_effect effect, uin
{
if (driver.input && driver.input_data && driver.input->set_rumble)
return driver.input->set_rumble(driver.input_data, port, effect, strength);
else
return false;
return false;
}
bool driver_set_sensor_state(unsigned port, enum retro_sensor_action action, unsigned rate)
{
if (driver.input && driver.input_data && driver.input->set_sensor_state)
return driver.input->set_sensor_state(driver.input_data, port, action, rate);
else
return false;
return false;
}
float driver_sensor_get_input(unsigned port, unsigned id)
{
if (driver.input && driver.input_data && driver.input->get_sensor_input)
return driver.input->get_sensor_input(driver.input_data, port, id);
else
return 0.0f;
return 0.0f;
}
uintptr_t driver_get_current_framebuffer(void)
@ -482,9 +479,8 @@ uintptr_t driver_get_current_framebuffer(void)
#ifdef HAVE_FBO
if (driver.video_poke && driver.video_poke->get_current_framebuffer)
return driver.video_poke->get_current_framebuffer(driver.video_data);
else
#endif
return 0;
return 0;
}
retro_proc_address_t driver_get_proc_address(const char *sym)
@ -492,9 +488,8 @@ retro_proc_address_t driver_get_proc_address(const char *sym)
#ifdef HAVE_FBO
if (driver.video_poke && driver.video_poke->get_proc_address)
return driver.video_poke->get_proc_address(driver.video_data, sym);
else
#endif
return NULL;
return NULL;
}
bool driver_update_system_av_info(const struct retro_system_av_info *info)