Skip to content

Commit

Permalink
controllermap: Don't treat SDL_HAT_CENTERED as a valid input.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 18, 2014
1 parent 1496be6 commit 1f45d4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/controllermap.c
Expand Up @@ -251,6 +251,9 @@ WatchJoystick(SDL_Joystick * joystick)

break;
case SDL_JOYHATMOTION:
if (event.jhat.value == SDL_HAT_CENTERED) {
break; /* ignore centering, we're probably just coming back to the center from the previous item we set. */
}
for (_s = 0; _s < s; _s++) {
if (steps[_s].hat == event.jhat.hat && steps[_s].hat_value == event.jhat.value) {
break;
Expand Down

0 comments on commit 1f45d4b

Please sign in to comment.