mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Skip analog input if analog is in digital mode
This commit is contained in:
parent
855351de9e
commit
8191b44b0b
15
retroarch.c
15
retroarch.c
@ -26580,6 +26580,21 @@ static int16_t input_joypad_analog_axis(
|
||||
const struct retro_keybind *bind_y_minus = NULL;
|
||||
const struct retro_keybind *bind_y_plus = NULL;
|
||||
|
||||
/* Skip analog input with analog_dpad_mode */
|
||||
switch (settings->uints.input_analog_dpad_mode[port])
|
||||
{
|
||||
case ANALOG_DPAD_LSTICK:
|
||||
if (idx == RETRO_DEVICE_INDEX_ANALOG_LEFT)
|
||||
return 0;
|
||||
break;
|
||||
case ANALOG_DPAD_RSTICK:
|
||||
if (idx == RETRO_DEVICE_INDEX_ANALOG_RIGHT)
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
input_conv_analog_id_to_bind_id(idx, ident, ident_minus, ident_plus);
|
||||
|
||||
bind_minus = &binds[ident_minus];
|
||||
|
Loading…
x
Reference in New Issue
Block a user