Skip to content

Commit

Permalink
Fixed binding D-pad on NES30 controller
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 13, 2019
1 parent 9f8009f commit 4d4e558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/SDL_joystick.c
Expand Up @@ -842,7 +842,7 @@ SDL_PrivateJoystickAxis(SDL_Joystick * joystick, Uint8 axis, Sint16 value)

info = &joystick->axes[axis];
if (!info->has_initial_value ||
(!info->has_second_value && info->initial_value == -32768 && SDL_abs(value) < (SDL_JOYSTICK_AXIS_MAX / 4))) {
(!info->has_second_value && (info->initial_value == -32768 || info->initial_value == 32767) && SDL_abs(value) < (SDL_JOYSTICK_AXIS_MAX / 4))) {
info->initial_value = value;
info->value = value;
info->zero = value;
Expand Down

0 comments on commit 4d4e558

Please sign in to comment.