[Commits] SDL: Fixed default Android D-PAD mapping so the back button is t...

libsdl.org revision control commits-owner at libsdl.org
Sat Dec 16 10:36:20 PST 2017


details:   https://hg.libsdl.org/SDL/rev/874fb85ef7b7
changeset: 11780:874fb85ef7b7
user:      Sam Lantinga <slouken at libsdl.org>
date:      Sat Dec 16 10:40:47 2017 -0800
description:
Fixed default Android D-PAD mapping so the back button is treated as B

diffstat:

 src/joystick/SDL_gamecontroller.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r b71dcf275cd5 -r 874fb85ef7b7 src/joystick/SDL_gamecontroller.c
--- a/src/joystick/SDL_gamecontroller.c	Sat Dec 16 10:40:45 2017 -0800
+++ b/src/joystick/SDL_gamecontroller.c	Sat Dec 16 10:40:47 2017 -0800
@@ -923,7 +923,7 @@
     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);
     }


More information about the commits mailing list