Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip analog input if analog is in digital mode #11205

Merged
merged 1 commit into from Aug 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions retroarch.c
Expand Up @@ -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];
Expand Down