mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 06:50:32 +00:00
Implement for JOYPAD explicitly. Defaults to 0.
This commit is contained in:
parent
2dfd32d694
commit
2f9585829e
@ -65,16 +65,7 @@ static int16_t input_ext_input_state(void *data, const struct retro_keybind **re
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_KEYBOARD:
|
||||
if (id >= RETROK_LAST)
|
||||
return 0;
|
||||
|
||||
bind.key = id;
|
||||
bind.joykey = NO_BTN;
|
||||
bind.joyaxis = AXIS_NONE;
|
||||
break;
|
||||
|
||||
default:
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
{
|
||||
if (id >= RARCH_BIND_LIST_END)
|
||||
return 0;
|
||||
@ -86,7 +77,22 @@ static int16_t input_ext_input_state(void *data, const struct retro_keybind **re
|
||||
bind.key = rarch_bind->key;
|
||||
bind.joykey = rarch_bind->joykey;
|
||||
bind.joyaxis = rarch_bind->joyaxis;
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO: RETRO_DEVICE_ANALOG.
|
||||
|
||||
case RETRO_DEVICE_KEYBOARD:
|
||||
if (id >= RETROK_LAST)
|
||||
return 0;
|
||||
|
||||
bind.key = id;
|
||||
bind.joykey = NO_BTN;
|
||||
bind.joyaxis = AXIS_NONE;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ext->driver->input_state(ext->handle, &bind, player);
|
||||
|
Loading…
Reference in New Issue
Block a user