Fixed default Android D-PAD mapping so the back button is treated as B
authorSam Lantinga <slouken@libsdl.org>
Sat, 16 Dec 2017 10:40:47 -0800
changeset 11780874fb85ef7b7
parent 11779 b71dcf275cd5
child 11781 c2f3e4187c9d
Fixed default Android D-PAD mapping so the back button is treated as B
src/joystick/SDL_gamecontroller.c
     1.1 --- a/src/joystick/SDL_gamecontroller.c	Sat Dec 16 10:40:45 2017 -0800
     1.2 +++ b/src/joystick/SDL_gamecontroller.c	Sat Dec 16 10:40:47 2017 -0800
     1.3 @@ -923,7 +923,7 @@
     1.4      if (!mapping && SDL_SYS_IsDPAD_DeviceIndex(device_index)) {
     1.5          SDL_bool existing;
     1.6          char mapping_string[1024];
     1.7 -        SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name);
     1.8 +        SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,a:b0,b:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name);
     1.9          mapping = SDL_PrivateAddMappingForGUID(guid, mapping_string,
    1.10                            &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
    1.11      }