mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Cleanup set_rumble functions
This commit is contained in:
parent
48bdbe8dec
commit
84a312535e
@ -117,15 +117,7 @@ static void ctr_input_grab_mouse(void *data, bool state)
|
||||
}
|
||||
|
||||
static bool ctr_input_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
(void)data;
|
||||
(void)port;
|
||||
(void)effect;
|
||||
(void)strength;
|
||||
|
||||
return false;
|
||||
}
|
||||
enum retro_rumble_effect effect, uint16_t strength) { return false; }
|
||||
|
||||
input_driver_t input_ctr = {
|
||||
ctr_input_init,
|
||||
|
@ -1000,9 +1000,9 @@ static bool dinput_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
struct dinput_input *di = (struct dinput_input*)data;
|
||||
if (!di)
|
||||
return false;
|
||||
return input_joypad_set_rumble(di->joypad, port, effect, strength);
|
||||
if (di)
|
||||
return input_joypad_set_rumble(di->joypad, port, effect, strength);
|
||||
return false;
|
||||
}
|
||||
|
||||
static const input_device_driver_t *dinput_get_joypad_driver(void *data)
|
||||
|
@ -304,22 +304,9 @@ static const input_device_driver_t *gx_input_get_joypad_driver(void *data)
|
||||
return gx->joypad;
|
||||
}
|
||||
|
||||
static void gx_input_grab_mouse(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
(void)state;
|
||||
}
|
||||
|
||||
static void gx_input_grab_mouse(void *data, bool state) { }
|
||||
static bool gx_input_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
(void)data;
|
||||
(void)port;
|
||||
(void)effect;
|
||||
(void)strength;
|
||||
|
||||
return false;
|
||||
}
|
||||
enum retro_rumble_effect effect, uint16_t strength) { return false; }
|
||||
|
||||
input_driver_t input_gx = {
|
||||
gx_input_init,
|
||||
|
@ -307,10 +307,7 @@ static bool ps3_input_set_sensor_state(void *data, unsigned port,
|
||||
}
|
||||
|
||||
static bool ps3_input_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
enum retro_rumble_effect effect, uint16_t strength) { return false; }
|
||||
|
||||
static const input_device_driver_t *ps3_input_get_joypad_driver(void *data)
|
||||
{
|
||||
|
@ -680,15 +680,7 @@ static void rwebinput_grab_mouse(void *data, bool state)
|
||||
}
|
||||
|
||||
static bool rwebinput_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
(void)data;
|
||||
(void)port;
|
||||
(void)effect;
|
||||
(void)strength;
|
||||
|
||||
return false;
|
||||
}
|
||||
enum retro_rumble_effect effect, uint16_t strength) { return false; }
|
||||
|
||||
static const input_device_driver_t *rwebinput_get_joypad_driver(void *data)
|
||||
{
|
||||
|
@ -298,9 +298,9 @@ static bool sdl_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
sdl_input_t *sdl = (sdl_input_t*)data;
|
||||
if (!sdl)
|
||||
return false;
|
||||
return input_joypad_set_rumble(sdl->joypad, port, effect, strength);
|
||||
if (sdl)
|
||||
return input_joypad_set_rumble(sdl->joypad, port, effect, strength);
|
||||
return false;
|
||||
}
|
||||
|
||||
static const input_device_driver_t *sdl_get_joypad_driver(void *data)
|
||||
|
@ -895,12 +895,10 @@ static bool switch_input_set_rumble(void *data, unsigned port,
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
switch_input_t *sw = (switch_input_t*) data;
|
||||
if (!sw)
|
||||
return false;
|
||||
return input_joypad_set_rumble(sw->joypad, port, effect, strength);
|
||||
#else
|
||||
return false;
|
||||
if (sw)
|
||||
return input_joypad_set_rumble(sw->joypad, port, effect, strength);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool switch_input_set_sensor_state(void *data, unsigned port,
|
||||
|
@ -87,9 +87,9 @@ static bool uwp_input_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
struct uwp_input *uwp = (struct uwp_input*)data;
|
||||
if (!uwp)
|
||||
return false;
|
||||
return input_joypad_set_rumble(uwp->joypad, port, effect, strength);
|
||||
if (uwp)
|
||||
return input_joypad_set_rumble(uwp->joypad, port, effect, strength);
|
||||
return false;
|
||||
}
|
||||
|
||||
static const input_device_driver_t *uwp_input_get_joypad_driver(void *data)
|
||||
|
@ -211,15 +211,7 @@ static void wiiu_input_grab_mouse(void *data, bool state)
|
||||
}
|
||||
|
||||
static bool wiiu_input_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
(void)data;
|
||||
(void)port;
|
||||
(void)effect;
|
||||
(void)strength;
|
||||
|
||||
return false;
|
||||
}
|
||||
enum retro_rumble_effect effect, uint16_t strength) { return false; }
|
||||
|
||||
input_driver_t input_wiiu = {
|
||||
wiiu_input_init,
|
||||
|
@ -754,9 +754,9 @@ static bool x_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
x11_input_t *x11 = (x11_input_t*)data;
|
||||
if (!x11)
|
||||
return false;
|
||||
return input_joypad_set_rumble(x11->joypad, port, effect, strength);
|
||||
if (x11)
|
||||
return input_joypad_set_rumble(x11->joypad, port, effect, strength);
|
||||
return false;
|
||||
}
|
||||
|
||||
static const input_device_driver_t *x_get_joypad_driver(void *data)
|
||||
|
@ -133,15 +133,7 @@ static void xenon360_input_grab_mouse(void *data, bool state)
|
||||
}
|
||||
|
||||
static bool xenon360_input_set_rumble(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
(void)data;
|
||||
(void)port;
|
||||
(void)effect;
|
||||
(void)strength;
|
||||
|
||||
return false;
|
||||
}
|
||||
enum retro_rumble_effect effect, uint16_t strength) { return false; }
|
||||
|
||||
static const input_device_driver_t *xenon360_get_joypad_driver(void *data)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user