Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix overflow in recent gamecontroller trigger change.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenpt committed Apr 19, 2013
1 parent c166dfb commit 0ff02eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/SDL_gamecontroller.c
Expand Up @@ -164,7 +164,7 @@ int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
case SDL_CONTROLLER_AXIS_TRIGGERLEFT:
case SDL_CONTROLLER_AXIS_TRIGGERRIGHT:
/* Shift it to be 0 - 32767. */
value = ( value + 32768 ) / 2;
value = value / 2 + 16384;
default:
break;
}
Expand Down

0 comments on commit 0ff02eb

Please sign in to comment.