Skip to content

Commit

Permalink
Fixed mapping third party XBox controllers that have the trigger axis…
Browse files Browse the repository at this point in the history
… all the way in until they are pulled and get updated values.
  • Loading branch information
slouken committed Dec 19, 2015
1 parent 4026980 commit 7b680a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/controllermap.c
Expand Up @@ -232,7 +232,7 @@ WatchJoystick(SDL_Joystick * joystick)
if (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_JOYAXISMOTION:
if (event.jaxis.value > 20000 || event.jaxis.value < -20000) {
if ((event.jaxis.value > 20000 || event.jaxis.value < -20000) && event.jaxis.value != -32768) {
for (_s = 0; _s < s; _s++) {
if (steps[_s].axis == event.jaxis.axis) {
break;
Expand Down

0 comments on commit 7b680a2

Please sign in to comment.