Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted
authorSam Lantinga <slouken@libsdl.org>
Tue, 27 Dec 2016 09:51:58 -0800
changeset 10726893faaa67394
parent 10725 fa8ffe60cf4f
child 10727 b40ce9a0c0d4
Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted
test/controllermap.c
     1.1 --- a/test/controllermap.c	Tue Dec 27 02:04:38 2016 -0800
     1.2 +++ b/test/controllermap.c	Tue Dec 27 09:51:58 2016 -0800
     1.3 @@ -413,7 +413,7 @@
     1.4                      if (nCurrentDistance > nFarthestDistance) {
     1.5                          pAxisState->m_nFarthestValue = nValue;
     1.6                      }
     1.7 -                    if (nCurrentDistance < 10000 && nFarthestDistance > 20000) {
     1.8 +                    if (nCurrentDistance <= 8000 && nFarthestDistance >= 20000) {
     1.9                          /* We've gone out and back, let's bind this axis */
    1.10                          SDL_GameControllerExtendedBind binding;
    1.11                          SDL_zero(binding);