Fix polling left trigger reporting right trigger's values.
authorJimb Esser <wasteland@gmail.com>
Sat, 16 Mar 2019 18:12:26 -0700
changeset 1264376caa6065d50
parent 12642 8a70b87401c3
child 12644 7c643f1c1887
Fix polling left trigger reporting right trigger's values.
src/joystick/SDL_gamecontroller.c
     1.1 --- a/src/joystick/SDL_gamecontroller.c	Sat Mar 16 18:11:09 2019 -0700
     1.2 +++ b/src/joystick/SDL_gamecontroller.c	Sat Mar 16 18:12:26 2019 -0700
     1.3 @@ -1658,6 +1658,8 @@
     1.4                          float normalized_value = (float)(value - binding->input.axis.axis_min) / (binding->input.axis.axis_max - binding->input.axis.axis_min);
     1.5                          value = binding->output.axis.axis_min + (int)(normalized_value * (binding->output.axis.axis_max - binding->output.axis.axis_min));
     1.6                      }
     1.7 +                } else {
     1.8 +                    value = 0;
     1.9                  }
    1.10              } else if (binding->inputType == SDL_CONTROLLER_BINDTYPE_BUTTON) {
    1.11                  value = SDL_JoystickGetButton(gamecontroller->joystick, binding->input.button);