mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Merge pull request #11205 from sonninnos/analog_dpad_override
Skip analog input if analog is in digital mode
This commit is contained in:
commit
b1d28fd7e0
15
retroarch.c
15
retroarch.c
@ -26559,6 +26559,21 @@ static int16_t input_joypad_analog_axis(
|
|||||||
const struct retro_keybind *bind_y_minus = NULL;
|
const struct retro_keybind *bind_y_minus = NULL;
|
||||||
const struct retro_keybind *bind_y_plus = 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);
|
input_conv_analog_id_to_bind_id(idx, ident, ident_minus, ident_plus);
|
||||||
|
|
||||||
bind_minus = &binds[ident_minus];
|
bind_minus = &binds[ident_minus];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user