Actually left trigger is motion axis 17 and right trigger is motion axis 18, which will map in that order to SDL axes.
authorSam Lantinga <slouken@libsdl.org>
Wed, 23 May 2018 17:15:33 -0700
changeset 1199876124cc14cbb
parent 11997 54699143c25a
child 11999 f3fc4b3d54f6
Actually left trigger is motion axis 17 and right trigger is motion axis 18, which will map in that order to SDL axes.
src/joystick/SDL_gamecontroller.c
     1.1 --- a/src/joystick/SDL_gamecontroller.c	Wed May 23 16:00:21 2018 -0700
     1.2 +++ b/src/joystick/SDL_gamecontroller.c	Wed May 23 17:15:33 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:a5,", sizeof(mapping_string));
     1.8 +        SDL_strlcat(mapping_string, "lefttrigger:a4,", sizeof(mapping_string));
     1.9      }
    1.10      if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) {
    1.11 -        SDL_strlcat(mapping_string, "righttrigger:a4,", sizeof(mapping_string));
    1.12 +        SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string));
    1.13      }
    1.14      return SDL_PrivateAddMappingForGUID(guid, mapping_string,
    1.15                        &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);