Fixed default mapping for Android controller triggers (they were reversed)
authorSam Lantinga <slouken@libsdl.org>
Wed, 23 May 2018 16:00:19 -0700
changeset 1199677c368583942
parent 11995 b34d86386ee1
child 11997 54699143c25a
Fixed default mapping for Android controller triggers (they were reversed)
src/joystick/SDL_gamecontroller.c
     1.1 --- a/src/joystick/SDL_gamecontroller.c	Mon May 21 12:05:17 2018 -0400
     1.2 +++ b/src/joystick/SDL_gamecontroller.c	Wed May 23 16:00:19 2018 -0700
     1.3 @@ -982,10 +982,10 @@
     1.4          SDL_strlcat(mapping_string, "righty:a3,", sizeof(mapping_string));
     1.5      }
     1.6      if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERLEFT)) {
     1.7 -        SDL_strlcat(mapping_string, "lefttrigger:a4,", sizeof(mapping_string));
     1.8 +        SDL_strlcat(mapping_string, "lefttrigger:a5,", sizeof(mapping_string));
     1.9      }
    1.10      if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) {
    1.11 -        SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string));
    1.12 +        SDL_strlcat(mapping_string, "righttrigger:a4,", sizeof(mapping_string));
    1.13      }
    1.14      return SDL_PrivateAddMappingForGUID(guid, mapping_string,
    1.15                        &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);