mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
input_joypad_pressed - cleanup
This commit is contained in:
parent
5eed4fd897
commit
b7d845df77
@ -85,15 +85,17 @@ static bool input_joypad_is_pressed(
|
||||
const struct retro_keybind *binds,
|
||||
unsigned key)
|
||||
{
|
||||
const struct retro_keybind *auto_binds;
|
||||
float scaled_axis;
|
||||
int16_t axis;
|
||||
uint32_t joyaxis;
|
||||
uint64_t joykey;
|
||||
const struct retro_keybind *auto_binds = NULL;
|
||||
unsigned joy_idx = g_settings.input.joypad_map[port];
|
||||
|
||||
if (joy_idx >= MAX_USERS)
|
||||
return false;
|
||||
if (!drv || !binds[key].valid)
|
||||
return false;
|
||||
|
||||
/* Auto-binds are per joypad, not per user. */
|
||||
auto_binds = g_settings.input.autoconf_binds[joy_idx];
|
||||
@ -130,8 +132,7 @@ static bool input_joypad_is_pressed(
|
||||
bool input_joypad_pressed(const rarch_joypad_driver_t *drv,
|
||||
unsigned port, const struct retro_keybind *binds, unsigned key)
|
||||
{
|
||||
if (!drv || !binds[key].valid ||
|
||||
!input_joypad_is_pressed(drv, port, binds, key))
|
||||
if (!input_joypad_is_pressed(drv, port, binds, key))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user