From c07656dbcbd07b837e1e8d18096f947baba1ef28 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 23 May 2018 16:00:19 -0700 Subject: [PATCH] Fixed default mapping for Android controller triggers (they were reversed) --- src/joystick/SDL_gamecontroller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index 6af3220c1..41a783155 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -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:a4,", sizeof(mapping_string)); + SDL_strlcat(mapping_string, "lefttrigger:a5,", sizeof(mapping_string)); } if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) { - SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string)); + SDL_strlcat(mapping_string, "righttrigger:a4,", sizeof(mapping_string)); } return SDL_PrivateAddMappingForGUID(guid, mapping_string, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);