controllermap: Don't treat SDL_HAT_CENTERED as a valid input.

--HG--
extra : rebase_source : d3d69e6f0f44f04fb8bf910b5888a5040be579d3
This commit is contained in:
Ryan C. Gordon 2014-03-18 12:33:57 -04:00
parent c984e9107a
commit 14e7c1e341

View file

@ -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;