termux-packages/x11-packages/sdl2/SDL2-2.0.8_src_joystick_SDL...

39 lines
1.4 KiB
Diff

diff -uNr SDL2-2.0.8/src/joystick/SDL_gamecontroller.c SDL2-2.0.8.mod/src/joystick/SDL_gamecontroller.c
--- SDL2-2.0.8/src/joystick/SDL_gamecontroller.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/joystick/SDL_gamecontroller.c 2018-09-07 16:13:56.473571477 +0300
@@ -33,9 +33,6 @@
#include "../events/SDL_events_c.h"
#endif
-#if defined(__ANDROID__)
-#include "SDL_system.h"
-#endif
#define SDL_CONTROLLER_PLATFORM_FIELD "platform:"
@@ -926,15 +923,6 @@
mapping = s_pXInputMapping;
}
#endif
-#if defined(__ANDROID__)
- 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:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name);
- mapping = SDL_PrivateAddMappingForGUID(guid, mapping_string,
- &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
- }
-#endif /* __ANDROID__ */
SDL_UnlockJoysticks();
return mapping;
}
@@ -1194,8 +1182,6 @@
#ifdef CONTROLLER_MAPPING_FILE
#define STRING(X) SDL_STRINGIFY_ARG(X)
return SDL_strlcpy(path, STRING(CONTROLLER_MAPPING_FILE), size) < size;
-#elif defined(__ANDROID__)
- return SDL_snprintf(path, size, "%s/controller_map.txt", SDL_AndroidGetInternalStoragePath()) < size;
#else
return SDL_FALSE;
#endif