Skip to content

Commit

Permalink
Actually left trigger is motion axis 17 and right trigger is motion a…
Browse files Browse the repository at this point in the history
…xis 18, which will map in that order to SDL axes.
  • Loading branch information
slouken committed May 24, 2018
1 parent 4d9a346 commit 361043a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/joystick/SDL_gamecontroller.c
Expand Up @@ -982,10 +982,10 @@ static ControllerMapping_t *SDL_CreateMappingForAndroidController(const char *na
SDL_strlcat(mapping_string, "righty:a3,", sizeof(mapping_string));
}
if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERLEFT)) {
SDL_strlcat(mapping_string, "lefttrigger:a5,", sizeof(mapping_string));
SDL_strlcat(mapping_string, "lefttrigger:a4,", sizeof(mapping_string));
}
if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) {
SDL_strlcat(mapping_string, "righttrigger:a4,", sizeof(mapping_string));
SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string));
}
return SDL_PrivateAddMappingForGUID(guid, mapping_string,
&existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
Expand Down

0 comments on commit 361043a

Please sign in to comment.