From 7b680a2ab7b334c8be34ea3be1631be093243b19 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 18 Dec 2015 18:49:23 -0800 Subject: [PATCH] Fixed mapping third party XBox controllers that have the trigger axis all the way in until they are pulled and get updated values. --- test/controllermap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllermap.c b/test/controllermap.c index eca82c3725139..da49cc17e663a 100644 --- a/test/controllermap.c +++ b/test/controllermap.c @@ -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;