sdl2: update to 2.0.9

This commit is contained in:
Leonid Pliushch 2018-11-09 17:12:54 +02:00 committed by Yaksh Bariya
parent 5e57a711f8
commit af1ba4e728
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
28 changed files with 322 additions and 230 deletions

View File

@ -1,12 +0,0 @@
diff -uNr SDL2-2.0.8/src/SDL.c SDL2-2.0.8.mod/src/SDL.c
--- SDL2-2.0.8/src/SDL.c 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/src/SDL.c 2018-09-07 16:13:56.480238188 +0300
@@ -396,8 +396,6 @@
{
#if __AIX__
return "AIX";
-#elif __ANDROID__
- return "Android";
#elif __BSDI__
return "BSDI";
#elif __DREAMCAST__

View File

@ -1,71 +0,0 @@
diff -uNr SDL2-2.0.8/src/dynapi/SDL_dynapi.c SDL2-2.0.8.mod/src/dynapi/SDL_dynapi.c
--- SDL2-2.0.8/src/dynapi/SDL_dynapi.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/dynapi/SDL_dynapi.c 2018-09-07 16:01:58.598812457 +0300
@@ -167,15 +167,10 @@
#error Write me.
#endif
-
-
-/* Here's the exported entry point that fills in the jump table. */
-/* Use specific types when an "int" might suffice to keep this sane. */
-typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
-extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
-
-Sint32
-SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
+/* we make this a static function so we can call the correct one without the
+ system's dynamic linker resolving to the wrong version of this. */
+static Sint32
+initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize)
{
SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *) table;
@@ -202,6 +197,18 @@
}
+/* Here's the exported entry point that fills in the jump table. */
+/* Use specific types when an "int" might suffice to keep this sane. */
+typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
+extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
+
+Sint32
+SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
+{
+ return initialize_jumptable(apiver, table, tablesize);
+}
+
+
/* Obviously we can't use SDL_LoadObject() to load SDL. :) */
/* Also obviously, we never close the loaded library. */
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
@@ -260,7 +267,7 @@
SDL_InitDynamicAPILocked(void)
{
const char *libname = SDL_getenv_REAL("SDL_DYNAMIC_API");
- SDL_DYNAPI_ENTRYFN entry = SDL_DYNAPI_entry; /* funcs from here by default. */
+ SDL_DYNAPI_ENTRYFN entry = NULL; /* funcs from here by default. */
if (libname) {
entry = (SDL_DYNAPI_ENTRYFN) get_sdlapi_entry(libname, "SDL_DYNAPI_entry");
@@ -268,16 +275,15 @@
/* !!! FIXME: fail to startup here instead? */
/* !!! FIXME: definitely warn user. */
/* Just fill in the function pointers from this library. */
- entry = SDL_DYNAPI_entry;
}
}
- if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) {
+ if (!entry || (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0)) {
/* !!! FIXME: fail to startup here instead? */
/* !!! FIXME: definitely warn user. */
/* Just fill in the function pointers from this library. */
- if (entry != SDL_DYNAPI_entry) {
- if (!SDL_DYNAPI_entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) {
+ if (!entry) {
+ if (!initialize_jumptable(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) {
/* !!! FIXME: now we're screwed. Should definitely abort now. */
}
}

View File

@ -1,38 +0,0 @@
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

View File

@ -1,20 +0,0 @@
diff -uNr SDL2-2.0.8/src/joystick/SDL_gamecontrollerdb.h SDL2-2.0.8.mod/src/joystick/SDL_gamecontrollerdb.h
--- SDL2-2.0.8/src/joystick/SDL_gamecontrollerdb.h 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/joystick/SDL_gamecontrollerdb.h 2018-09-07 16:13:56.476904833 +0300
@@ -207,16 +207,6 @@
"03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
"03000000830500006020000010010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,",
#endif
-#if defined(__ANDROID__)
- "34323662653333636330306631326233,ASUS Gamepad,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,",
- "64633436313965656664373634323364,Microsoft X-Box 360 pad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,",
- "4e564944494120436f72706f72617469,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "61363931656135336130663561616264,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "37336435666338653565313731303834,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,",
- "05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
- "34356136633366613530316338376136,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,x:b17,y:b2,",
-#endif
#if defined(SDL_JOYSTICK_MFI)
"4d466947616d65706164010000000000,MFi Extended Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,",
"4d466947616d65706164020000000000,MFi Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,",

View File

@ -1,14 +0,0 @@
diff -uNr SDL2-2.0.8/src/joystick/SDL_sysjoystick.h SDL2-2.0.8.mod/src/joystick/SDL_sysjoystick.h
--- SDL2-2.0.8/src/joystick/SDL_sysjoystick.h 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/joystick/SDL_sysjoystick.h 2018-09-07 16:13:56.476904833 +0300
@@ -126,10 +126,6 @@
extern SDL_bool SDL_SYS_IsXInputGamepad_DeviceIndex(int device_index);
#endif
-#if defined(__ANDROID__)
-/* Function returns SDL_TRUE if this device is a DPAD (maybe a TV remote) */
-extern SDL_bool SDL_SYS_IsDPAD_DeviceIndex(int device_index);
-#endif
#endif /* SDL_sysjoystick_h_ */

View File

@ -1,12 +0,0 @@
diff -uNr SDL2-2.0.8/src/video/khronos/KHR/khrplatform.h SDL2-2.0.8.mod/src/video/khronos/KHR/khrplatform.h
--- SDL2-2.0.8/src/video/khronos/KHR/khrplatform.h 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/video/khronos/KHR/khrplatform.h 2018-09-07 16:13:56.483571544 +0300
@@ -101,8 +101,6 @@
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
-#elif defined(__ANDROID__)
-# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif

View File

@ -1,7 +1,7 @@
diff -uNr SDL2-2.0.8/configure SDL2-2.0.8.mod/configure
--- SDL2-2.0.8/configure 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/configure 2018-09-07 16:02:49.355817898 +0300
@@ -23831,23 +23831,6 @@
diff -uNr SDL2-2.0.9/configure SDL2-2.0.9.mod/configure
--- SDL2-2.0.9/configure 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/configure 2018-11-09 16:53:56.444723538 +0200
@@ -23990,23 +23990,6 @@
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
case "$host" in

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/include/SDL_config.h SDL2-2.0.8.mod/include/SDL_config.h
--- SDL2-2.0.8/include/SDL_config.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_config.h 2018-09-07 16:11:53.382758975 +0300
diff -uNr SDL2-2.0.9/include/SDL_config.h SDL2-2.0.9.mod/include/SDL_config.h
--- SDL2-2.0.9/include/SDL_config.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_config.h 2018-11-09 16:54:07.244857005 +0200
@@ -37,8 +37,6 @@
#include "SDL_config_macosx.h"
#elif defined(__IPHONEOS__)
@ -9,4 +9,4 @@ diff -uNr SDL2-2.0.8/include/SDL_config.h SDL2-2.0.8.mod/include/SDL_config.h
-#include "SDL_config_android.h"
#elif defined(__PSP__)
#include "SDL_config_psp.h"
#else
#elif defined(__OS2__)

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/include/SDL_egl.h SDL2-2.0.8.mod/include/SDL_egl.h
--- SDL2-2.0.8/include/SDL_egl.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_egl.h 2018-09-07 16:16:21.297859815 +0300
diff -uNr SDL2-2.0.9/include/SDL_egl.h SDL2-2.0.9.mod/include/SDL_egl.h
--- SDL2-2.0.9/include/SDL_egl.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_egl.h 2018-11-09 16:54:15.701628001 +0200
@@ -24,7 +24,7 @@
*
* This is a simple file to encapsulate the EGL API headers.

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/include/SDL_main.h SDL2-2.0.8.mod/include/SDL_main.h
--- SDL2-2.0.8/include/SDL_main.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_main.h 2018-09-07 16:13:56.450237991 +0300
diff -uNr SDL2-2.0.9/include/SDL_main.h SDL2-2.0.9.mod/include/SDL_main.h
--- SDL2-2.0.9/include/SDL_main.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_main.h 2018-11-09 16:54:23.835061530 +0200
@@ -59,17 +59,6 @@
*/
#define SDL_MAIN_NEEDED

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/include/SDL_platform.h SDL2-2.0.8.mod/include/SDL_platform.h
--- SDL2-2.0.8/include/SDL_platform.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_platform.h 2018-09-07 16:15:56.164360808 +0300
diff -uNr SDL2-2.0.9/include/SDL_platform.h SDL2-2.0.9.mod/include/SDL_platform.h
--- SDL2-2.0.9/include/SDL_platform.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_platform.h 2018-11-09 16:54:32.445167443 +0200
@@ -60,11 +60,6 @@
#undef __LINUX__
#define __LINUX__ 1

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/include/SDL_rwops.h SDL2-2.0.8.mod/include/SDL_rwops.h
--- SDL2-2.0.8/include/SDL_rwops.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_rwops.h 2018-09-07 16:13:56.453571346 +0300
diff -uNr SDL2-2.0.9/include/SDL_rwops.h SDL2-2.0.9.mod/include/SDL_rwops.h
--- SDL2-2.0.9/include/SDL_rwops.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_rwops.h 2018-11-09 16:54:40.285263749 +0200
@@ -93,20 +93,7 @@
Uint32 type;
union

View File

@ -1,7 +1,7 @@
diff -uNr SDL2-2.0.8/include/SDL_stdinc.h SDL2-2.0.8.mod/include/SDL_stdinc.h
--- SDL2-2.0.8/include/SDL_stdinc.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_stdinc.h 2018-09-07 16:13:56.456904701 +0300
@@ -310,7 +310,6 @@
diff -uNr SDL2-2.0.9/include/SDL_stdinc.h SDL2-2.0.9.mod/include/SDL_stdinc.h
--- SDL2-2.0.9/include/SDL_stdinc.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_stdinc.h 2018-11-09 16:54:52.125408951 +0200
@@ -332,7 +332,6 @@
/** \cond */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
@ -9,7 +9,7 @@ diff -uNr SDL2-2.0.8/include/SDL_stdinc.h SDL2-2.0.8.mod/include/SDL_stdinc.h
/* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
typedef enum
{
@@ -318,7 +317,6 @@
@@ -340,7 +339,6 @@
} SDL_DUMMY_ENUM;
SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));

View File

@ -1,10 +1,12 @@
diff -uNr SDL2-2.0.8/include/SDL_system.h SDL2-2.0.8.mod/include/SDL_system.h
--- SDL2-2.0.8/include/SDL_system.h 2018-03-01 18:34:41.000000000 +0200
+++ SDL2-2.0.8.mod/include/SDL_system.h 2018-09-07 16:13:56.456904701 +0300
@@ -89,63 +89,6 @@
diff -uNr SDL2-2.0.9/include/SDL_system.h SDL2-2.0.9.mod/include/SDL_system.h
--- SDL2-2.0.9/include/SDL_system.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/include/SDL_system.h 2018-11-09 16:59:30.138749528 +0200
@@ -99,81 +99,6 @@
#endif /* __IPHONEOS__ */
/* Platform specific functions for Android */
-
-/* Platform specific functions for Android */
-#if defined(__ANDROID__) && __ANDROID__
-
-/**
@ -30,6 +32,21 @@ diff -uNr SDL2-2.0.8/include/SDL_system.h SDL2-2.0.8.mod/include/SDL_system.h
-extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
-
-/**
- \brief Return true if the application is running on a Chromebook
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
-
-/**
- \brief Return true is the application is running on a Samsung DeX docking station
- */
-extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
-
-/**
- \brief Trigger the Android system back button behavior.
- */
-extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
-
-/**
- See the official Android developer guide for more information:
- http://developer.android.com/guide/topics/data/data-storage.html
-*/
@ -62,6 +79,7 @@ diff -uNr SDL2-2.0.8/include/SDL_system.h SDL2-2.0.8.mod/include/SDL_system.h
-extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
-
-#endif /* __ANDROID__ */
-
/* Platform specific functions for WinRT */
#if defined(__WINRT__) && __WINRT__

View File

@ -0,0 +1,24 @@
diff -uNr SDL2-2.0.9/src/SDL.c SDL2-2.0.9.mod/src/SDL.c
--- SDL2-2.0.9/src/SDL.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/SDL.c 2018-11-09 17:09:44.315855024 +0200
@@ -420,8 +420,6 @@
{
#if __AIX__
return "AIX";
-#elif __ANDROID__
- return "Android";
#elif __BSDI__
return "BSDI";
#elif __DREAMCAST__
@@ -478,10 +476,7 @@
SDL_bool
SDL_IsTablet()
{
-#if __ANDROID__
- extern SDL_bool SDL_IsAndroidTablet(void);
- return SDL_IsAndroidTablet();
-#elif __IPHONEOS__
+#if __IPHONEOS__
extern SDL_bool SDL_IsIPad(void);
return SDL_IsIPad();
#else

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/src/SDL_log.c SDL2-2.0.8.mod/src/SDL_log.c
--- SDL2-2.0.8/src/SDL_log.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/SDL_log.c 2018-09-07 16:13:56.483571544 +0300
diff -uNr SDL2-2.0.9/src/SDL_log.c SDL2-2.0.9.mod/src/SDL_log.c
--- SDL2-2.0.9/src/SDL_log.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/SDL_log.c 2018-11-09 16:57:23.150571689 +0200
@@ -33,9 +33,6 @@
#include <stdio.h>
#endif

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/src/atomic/SDL_atomic.c SDL2-2.0.8.mod/src/atomic/SDL_atomic.c
--- SDL2-2.0.8/src/atomic/SDL_atomic.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/atomic/SDL_atomic.c 2018-09-07 16:13:56.456904701 +0300
diff -uNr SDL2-2.0.9/src/atomic/SDL_atomic.c SDL2-2.0.9.mod/src/atomic/SDL_atomic.c
--- SDL2-2.0.9/src/atomic/SDL_atomic.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/atomic/SDL_atomic.c 2018-11-09 16:55:24.719140558 +0200
@@ -41,9 +41,7 @@
# if __has_builtin(__atomic_load_n)
/* !!! FIXME: this advertises as available in the NDK but uses an external symbol we don't have.

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/src/dynapi/SDL_dynapi_procs.h SDL2-2.0.8.mod/src/dynapi/SDL_dynapi_procs.h
--- SDL2-2.0.8/src/dynapi/SDL_dynapi_procs.h 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/dynapi/SDL_dynapi_procs.h 2018-09-07 16:13:56.466904767 +0300
diff -uNr SDL2-2.0.9/src/dynapi/SDL_dynapi_procs.h SDL2-2.0.9.mod/src/dynapi/SDL_dynapi_procs.h
--- SDL2-2.0.9/src/dynapi/SDL_dynapi_procs.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/dynapi/SDL_dynapi_procs.h 2018-11-09 17:09:11.612148648 +0200
@@ -74,13 +74,6 @@
SDL_DYNAPI_PROC(void,SDL_iPhoneSetEventPump,(SDL_bool a),(a),)
#endif
@ -15,7 +15,7 @@ diff -uNr SDL2-2.0.8/src/dynapi/SDL_dynapi_procs.h SDL2-2.0.8.mod/src/dynapi/SDL
SDL_DYNAPI_PROC(int,SDL_Init,(Uint32 a),(a),return)
SDL_DYNAPI_PROC(int,SDL_InitSubSystem,(Uint32 a),(a),return)
@@ -702,8 +695,5 @@
@@ -702,9 +695,6 @@
#ifdef __WINRT__
SDL_DYNAPI_PROC(SDL_WinRT_DeviceFamily,SDL_WinRTGetDeviceFamily,(void),(),return)
#endif
@ -24,3 +24,16 @@ diff -uNr SDL2-2.0.8/src/dynapi/SDL_dynapi_procs.h SDL2-2.0.8.mod/src/dynapi/SDL
-#endif
SDL_DYNAPI_PROC(double,SDL_log10,(double a),(a),return)
SDL_DYNAPI_PROC(float,SDL_log10f,(float a),(a),return)
SDL_DYNAPI_PROC(char*,SDL_GameControllerMappingForDeviceIndex,(int a),(a),return)
@@ -712,11 +702,6 @@
SDL_DYNAPI_PROC(int,SDL_LinuxSetThreadPriority,(Sint64 a, int b),(a,b),return)
#endif
SDL_DYNAPI_PROC(SDL_bool,SDL_HasAVX512F,(void),(),return)
-#ifdef __ANDROID__
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsChromebook,(void),(),return)
-SDL_DYNAPI_PROC(SDL_bool,SDL_IsDeXMode,(void),(),return)
-SDL_DYNAPI_PROC(void,SDL_AndroidBackButton,(void),(),return)
-#endif
SDL_DYNAPI_PROC(double,SDL_exp,(double a),(a),return)
SDL_DYNAPI_PROC(float,SDL_expf,(float a),(a),return)
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsdup,(const wchar_t *a),(a),return)

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/src/file/SDL_rwops.c SDL2-2.0.8.mod/src/file/SDL_rwops.c
--- SDL2-2.0.8/src/file/SDL_rwops.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/file/SDL_rwops.c 2018-09-07 16:08:37.898133057 +0300
diff -uNr SDL2-2.0.9/src/file/SDL_rwops.c SDL2-2.0.9.mod/src/file/SDL_rwops.c
--- SDL2-2.0.9/src/file/SDL_rwops.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/file/SDL_rwops.c 2018-11-09 16:56:08.653007577 +0200
@@ -51,10 +51,6 @@
#include "cocoa/SDL_rwopsbundlesupport.h"
#endif /* __APPLE__ */

View File

@ -0,0 +1,155 @@
diff -uNr SDL2-2.0.9/src/joystick/SDL_gamecontroller.c SDL2-2.0.9.mod/src/joystick/SDL_gamecontroller.c
--- SDL2-2.0.9/src/joystick/SDL_gamecontroller.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/joystick/SDL_gamecontroller.c 2018-11-09 17:03:00.684548640 +0200
@@ -34,10 +34,6 @@
#include "../events/SDL_events_c.h"
#endif
-#if defined(__ANDROID__)
-#include "SDL_system.h"
-#endif
-
/* Many controllers turn the center button into an instantaneous button press */
#define SDL_MINIMUM_GUIDE_BUTTON_DELAY_MS 250
@@ -887,119 +883,6 @@
return pControllerMapping;
}
-#ifdef __ANDROID__
-/*
- * Helper function to guess at a mapping based on the elements reported for this controller
- */
-static ControllerMapping_t *SDL_CreateMappingForAndroidController(const char *name, SDL_JoystickGUID guid)
-{
- SDL_bool existing;
- char name_string[128];
- char mapping_string[1024];
- int button_mask;
- int axis_mask;
-
- button_mask = SDL_SwapLE16(*(Uint16*)(&guid.data[sizeof(guid.data)-4]));
- axis_mask = SDL_SwapLE16(*(Uint16*)(&guid.data[sizeof(guid.data)-2]));
- if (!button_mask && !axis_mask) {
- /* Accelerometer, shouldn't have a game controller mapping */
- return NULL;
- }
-
- /* Remove any commas in the name */
- SDL_strlcpy(name_string, name, sizeof(name_string));
- {
- char *spot;
- for (spot = name_string; *spot; ++spot) {
- if (*spot == ',') {
- *spot = ' ';
- }
- }
- }
- SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,", name_string);
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_A)) {
- SDL_strlcat(mapping_string, "a:b0,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_B)) {
- SDL_strlcat(mapping_string, "b:b1,", sizeof(mapping_string));
- } else if (button_mask & (1 << SDL_CONTROLLER_BUTTON_BACK)) {
- /* Use the back button as "B" for easy UI navigation with TV remotes */
- SDL_strlcat(mapping_string, "b:b4,", sizeof(mapping_string));
- button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_BACK);
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_X)) {
- SDL_strlcat(mapping_string, "x:b2,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_Y)) {
- SDL_strlcat(mapping_string, "y:b3,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_BACK)) {
- SDL_strlcat(mapping_string, "back:b4,", sizeof(mapping_string));
- }
-#if 0 /* The guide button generally isn't functional (or acts as a home button) on most Android controllers */
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_GUIDE)) {
- SDL_strlcat(mapping_string, "guide:b5,", sizeof(mapping_string));
-#if 0 /* Actually this will be done in Steam */
- } else if (button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
- /* The guide button doesn't exist, use the start button instead,
- so you can do Steam guide button chords and open the Steam overlay.
- */
- SDL_strlcat(mapping_string, "guide:b6,", sizeof(mapping_string));
- button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_START);
-#endif
- }
-#endif
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
- SDL_strlcat(mapping_string, "start:b6,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_LEFTSTICK)) {
- SDL_strlcat(mapping_string, "leftstick:b7,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_RIGHTSTICK)) {
- SDL_strlcat(mapping_string, "rightstick:b8,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_LEFTSHOULDER)) {
- SDL_strlcat(mapping_string, "leftshoulder:b9,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_RIGHTSHOULDER)) {
- SDL_strlcat(mapping_string, "rightshoulder:b10,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_DPAD_UP)) {
- SDL_strlcat(mapping_string, "dpup:b11,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_DPAD_DOWN)) {
- SDL_strlcat(mapping_string, "dpdown:b12,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_DPAD_LEFT)) {
- SDL_strlcat(mapping_string, "dpleft:b13,", sizeof(mapping_string));
- }
- if (button_mask & (1 << SDL_CONTROLLER_BUTTON_DPAD_RIGHT)) {
- SDL_strlcat(mapping_string, "dpright:b14,", sizeof(mapping_string));
- }
- if (axis_mask & (1 << SDL_CONTROLLER_AXIS_LEFTX)) {
- SDL_strlcat(mapping_string, "leftx:a0,", sizeof(mapping_string));
- }
- if (axis_mask & (1 << SDL_CONTROLLER_AXIS_LEFTY)) {
- SDL_strlcat(mapping_string, "lefty:a1,", sizeof(mapping_string));
- }
- if (axis_mask & (1 << SDL_CONTROLLER_AXIS_RIGHTX)) {
- SDL_strlcat(mapping_string, "rightx:a2,", sizeof(mapping_string));
- }
- if (axis_mask & (1 << SDL_CONTROLLER_AXIS_RIGHTY)) {
- 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));
- }
- if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) {
- SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string));
- }
- return SDL_PrivateAddMappingForGUID(guid, mapping_string,
- &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
-}
-#endif /* __ANDROID__ */
-
-
/*
* Helper function to determine pre-calculated offset to certain joystick mappings
*/
@@ -1025,11 +908,6 @@
mapping = s_pXInputMapping;
}
}
-#ifdef __ANDROID__
- if (!mapping && name && !SDL_IsJoystickHIDAPI(guid)) {
- mapping = SDL_CreateMappingForAndroidController(name, guid);
- }
-#endif
if (!mapping) {
mapping = s_pDefaultMapping;
}
@@ -1315,8 +1193,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

View File

@ -0,0 +1,26 @@
diff -uNr SDL2-2.0.9/src/joystick/SDL_gamecontrollerdb.h SDL2-2.0.9.mod/src/joystick/SDL_gamecontrollerdb.h
--- SDL2-2.0.9/src/joystick/SDL_gamecontrollerdb.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/joystick/SDL_gamecontrollerdb.h 2018-11-09 17:03:52.268480237 +0200
@@ -559,22 +559,6 @@
"03000000b50700001503000010010000,impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,",
"030000009b2800000300000001010000,raphnet.net 4nes4snes v1.5,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,",
#endif
-#if defined(__ANDROID__)
- "05000000d6020000e5890000dfff3f00,GPD XD Plus,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,",
- "05000000bc20000000550000ffff3f00,GameSir G3w,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "050000005509000003720000cf7f3f00,NVIDIA Controller v01.01,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "050000005509000010720000ffff3f00,NVIDIA Controller v01.03,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b17,y:b2,", /* Extremely slow in Bluetooth mode on Android */
- "050000004c05000068020000dfff3f00,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "050000004c050000c4050000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,",
- "050000004c050000cc090000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,",
- "050000003215000000090000bf7f3f00,Razer Serval,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,",
- "05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
- "05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
- "050000005e040000e00200000ffe3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,",
- "050000005e040000fd020000ffff3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
- "050000005e04000091020000ff073f00,Xbox Wireless Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,", /* The DPAD doesn't seem to work on this controller on Android TV? */
-#endif
#if defined(SDL_JOYSTICK_MFI)
"05000000ac0500000100000000006d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,",
"05000000ac0500000200000000006d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,",

View File

@ -0,0 +1,12 @@
diff -uNr SDL2-2.0.9/src/joystick/SDL_sysjoystick.h SDL2-2.0.9.mod/src/joystick/SDL_sysjoystick.h
--- SDL2-2.0.9/src/joystick/SDL_sysjoystick.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/joystick/SDL_sysjoystick.h 2018-11-09 17:04:46.285771392 +0200
@@ -74,7 +74,7 @@
struct _SDL_Joystick *next; /* pointer to next joystick we have allocated */
};
-#if defined(__IPHONEOS__) || defined(__ANDROID__)
+#if defined(__IPHONEOS__)
#define HAVE_STEAMCONTROLLERS
#define USE_STEAMCONTROLLER_HIDAPI
#elif defined(__LINUX__)

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/src/stdlib/SDL_getenv.c SDL2-2.0.8.mod/src/stdlib/SDL_getenv.c
--- SDL2-2.0.8/src/stdlib/SDL_getenv.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/stdlib/SDL_getenv.c 2018-09-07 16:09:26.021784895 +0300
diff -uNr SDL2-2.0.9/src/stdlib/SDL_getenv.c SDL2-2.0.9.mod/src/stdlib/SDL_getenv.c
--- SDL2-2.0.9/src/stdlib/SDL_getenv.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/stdlib/SDL_getenv.c 2018-11-09 16:57:33.934034207 +0200
@@ -29,9 +29,6 @@
#include "../core/windows/SDL_windows.h"
#endif

View File

@ -1,7 +1,7 @@
diff -uNr SDL2-2.0.8/src/thread/pthread/SDL_systhread.c SDL2-2.0.8.mod/src/thread/pthread/SDL_systhread.c
--- SDL2-2.0.8/src/thread/pthread/SDL_systhread.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/thread/pthread/SDL_systhread.c 2018-09-07 16:09:32.998497718 +0300
@@ -47,9 +47,6 @@
diff -uNr SDL2-2.0.9/src/thread/pthread/SDL_systhread.c SDL2-2.0.9.mod/src/thread/pthread/SDL_systhread.c
--- SDL2-2.0.9/src/thread/pthread/SDL_systhread.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/thread/pthread/SDL_systhread.c 2018-11-09 16:57:44.624162105 +0200
@@ -51,9 +51,6 @@
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
@ -11,7 +11,7 @@ diff -uNr SDL2-2.0.8/src/thread/pthread/SDL_systhread.c SDL2-2.0.8.mod/src/threa
#ifdef __HAIKU__
#include <kernel/OS.h>
@@ -68,9 +65,6 @@
@@ -72,9 +69,6 @@
static void *
RunThread(void *data)
{

View File

@ -1,7 +1,7 @@
diff -uNr SDL2-2.0.8/src/video/SDL_video.c SDL2-2.0.8.mod/src/video/SDL_video.c
--- SDL2-2.0.8/src/video/SDL_video.c 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/video/SDL_video.c 2018-09-07 16:18:48.995499542 +0300
@@ -1375,12 +1375,6 @@
diff -uNr SDL2-2.0.9/src/video/SDL_video.c SDL2-2.0.9.mod/src/video/SDL_video.c
--- SDL2-2.0.9/src/video/SDL_video.c 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/video/SDL_video.c 2018-11-09 16:58:16.844546616 +0200
@@ -1435,12 +1435,6 @@
return NULL;
}
@ -13,4 +13,4 @@ diff -uNr SDL2-2.0.8/src/video/SDL_video.c SDL2-2.0.8.mod/src/video/SDL_video.c
-#endif
if (flags & SDL_WINDOW_OPENGL) {
if (!_this->GL_CreateContext) {
SDL_SetError("No OpenGL support in video driver");
SDL_SetError("OpenGL support is either not configured in SDL "

View File

@ -0,0 +1,12 @@
diff -uNr SDL2-2.0.9/src/video/khronos/KHR/khrplatform.h SDL2-2.0.9.mod/src/video/khronos/KHR/khrplatform.h
--- SDL2-2.0.9/src/video/khronos/KHR/khrplatform.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/video/khronos/KHR/khrplatform.h 2018-11-09 16:57:54.124275632 +0200
@@ -101,8 +101,6 @@
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
-#elif defined(__ANDROID__)
-# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif

View File

@ -1,6 +1,6 @@
diff -uNr SDL2-2.0.8/src/video/khronos/vulkan/vk_platform.h SDL2-2.0.8.mod/src/video/khronos/vulkan/vk_platform.h
--- SDL2-2.0.8/src/video/khronos/vulkan/vk_platform.h 2018-03-01 18:34:42.000000000 +0200
+++ SDL2-2.0.8.mod/src/video/khronos/vulkan/vk_platform.h 2018-09-07 16:13:56.483571544 +0300
diff -uNr SDL2-2.0.9/src/video/khronos/vulkan/vk_platform.h SDL2-2.0.9.mod/src/video/khronos/vulkan/vk_platform.h
--- SDL2-2.0.9/src/video/khronos/vulkan/vk_platform.h 2018-10-31 17:07:22.000000000 +0200
+++ SDL2-2.0.9.mod/src/video/khronos/vulkan/vk_platform.h 2018-11-09 16:58:07.281099306 +0200
@@ -51,16 +51,6 @@
#define VKAPI_ATTR
#define VKAPI_CALL __stdcall

View File

@ -2,10 +2,9 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_HOMEPAGE=https://www.libsdl.org
TERMUX_PKG_DESCRIPTION="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (version 2)"
TERMUX_PKG_VERSION=2.0.8
TERMUX_PKG_REVISION=4
TERMUX_PKG_VERSION=2.0.9
TERMUX_PKG_SRCURL=https://www.libsdl.org/release/SDL2-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=edc77c57308661d576e843344d8638e025a7818bff73f8fbfab09c3c5fd092ec
TERMUX_PKG_SHA256=255186dc676ecd0c1dbf10ec8a2cc5d6869b5079d8a38194c2aecdff54b324b1
TERMUX_PKG_DEPENDS="libandroid-glob, libandroid-support, libflac, libogg, libpulseaudio, libsndfile, libvorbis, libx11, libxau, libxcb, libxcursor, libxdmcp, libxext, libxfixes, libxi, libxinerama, libxrandr, libxrender, libxss, libxxf86vm"
TERMUX_PKG_CONFLICTS="libsdl2"