mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
controllermap: Don't treat SDL_HAT_CENTERED as a valid input.
This commit is contained in:
@@ -251,6 +251,9 @@ WatchJoystick(SDL_Joystick * joystick)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case SDL_JOYHATMOTION:
|
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++) {
|
for (_s = 0; _s < s; _s++) {
|
||||||
if (steps[_s].hat == event.jhat.hat && steps[_s].hat_value == event.jhat.value) {
|
if (steps[_s].hat == event.jhat.hat && steps[_s].hat_value == event.jhat.value) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user