Explorar o código

Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted

Sam Lantinga %!s(int64=9) %!d(string=hai) anos
pai
achega
21cb42d79b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      test/controllermap.c

+ 1 - 1
test/controllermap.c

@@ -413,7 +413,7 @@ WatchJoystick(SDL_Joystick * joystick)
                     if (nCurrentDistance > nFarthestDistance) {
                         pAxisState->m_nFarthestValue = nValue;
                     }
-                    if (nCurrentDistance < 10000 && nFarthestDistance > 20000) {
+                    if (nCurrentDistance <= 8000 && nFarthestDistance >= 20000) {
                         /* We've gone out and back, let's bind this axis */
                         SDL_GameControllerExtendedBind binding;
                         SDL_zero(binding);