From e5cfa241829ef5325a8fbfd43a65e3029dbfcf52 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 16 Dec 2017 10:40:47 -0800 Subject: [PATCH] Fixed default Android D-PAD mapping so the back button is treated as B --- src/joystick/SDL_gamecontroller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index a07d87a93e5fd..d976c46b88a21 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -923,7 +923,7 @@ static ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) if (!mapping && SDL_SYS_IsDPAD_DeviceIndex(device_index)) { SDL_bool existing; char mapping_string[1024]; - SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name); + SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,a:b0,b:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name); mapping = SDL_PrivateAddMappingForGUID(guid, mapping_string, &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT); }