Skip to content

Commit d9790ea

Browse files
joao-condeCobrand
authored andcommitted
feat: add all code from sdl 2.0.14 release in include/
1 parent 6db5dcb commit d9790ea

37 files changed

+1068
-159
lines changed

sdl2-sys/SDL2-2.0.14/include/SDL.h

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
#include "SDL_timer.h"
6060
#include "SDL_version.h"
6161
#include "SDL_video.h"
62+
#include "SDL_locale.h"
63+
#include "SDL_misc.h"
6264

6365
#include "begin_code.h"
6466
/* Set up for C function definitions, even when using C++ */

sdl2-sys/SDL2-2.0.14/include/SDL_assert.h

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ assert can have unique static variables associated with it.
5353
#define SDL_TriggerBreakpoint() __debugbreak()
5454
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
5555
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
56+
#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
57+
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
5658
#elif defined(__386__) && defined(__WATCOMC__)
5759
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
5860
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)

sdl2-sys/SDL2-2.0.14/include/SDL_config.h.cmake

+19-4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
#cmakedefine HAVE_WCSSTR 1
101101
#cmakedefine HAVE_WCSCMP 1
102102
#cmakedefine HAVE_WCSNCMP 1
103+
#cmakedefine HAVE_WCSCASECMP 1
104+
#cmakedefine HAVE__WCSICMP 1
105+
#cmakedefine HAVE_WCSNCASECMP 1
106+
#cmakedefine HAVE__WCSNICMP 1
103107
#cmakedefine HAVE_STRLEN 1
104108
#cmakedefine HAVE_STRLCPY 1
105109
#cmakedefine HAVE_STRLCAT 1
@@ -172,6 +176,8 @@
172176
#cmakedefine HAVE_SQRTF 1
173177
#cmakedefine HAVE_TAN 1
174178
#cmakedefine HAVE_TANF 1
179+
#cmakedefine HAVE_TRUNC 1
180+
#cmakedefine HAVE_TRUNCF 1
175181
#cmakedefine HAVE_FOPEN64 1
176182
#cmakedefine HAVE_FSEEKO 1
177183
#cmakedefine HAVE_FSEEKO64 1
@@ -189,6 +195,7 @@
189195
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
190196
#cmakedefine HAVE_SEM_TIMEDWAIT 1
191197
#cmakedefine HAVE_GETAUXVAL 1
198+
#cmakedefine HAVE_ELF_AUX_INFO 1
192199
#cmakedefine HAVE_POLL 1
193200
#cmakedefine HAVE__EXIT 1
194201

@@ -203,11 +210,15 @@
203210

204211
#cmakedefine HAVE_ALTIVEC_H 1
205212
#cmakedefine HAVE_DBUS_DBUS_H 1
206-
#cmakedefine HAVE_FCITX_FRONTEND_H 1
213+
#cmakedefine HAVE_FCITX 1
207214
#cmakedefine HAVE_IBUS_IBUS_H 1
215+
#cmakedefine HAVE_SYS_INOTIFY_H 1
216+
#cmakedefine HAVE_INOTIFY_INIT 1
217+
#cmakedefine HAVE_INOTIFY_INIT1 1
218+
#cmakedefine HAVE_INOTIFY 1
208219
#cmakedefine HAVE_IMMINTRIN_H 1
209-
#cmakedefine HAVE_LIBSAMPLERATE_H 1
210220
#cmakedefine HAVE_LIBUDEV_H 1
221+
#cmakedefine HAVE_LIBSAMPLERATE_H 1
211222

212223
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
213224
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
@@ -219,6 +230,7 @@
219230

220231
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
221232
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
233+
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
222234

223235
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
224236
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
@@ -279,7 +291,6 @@
279291
/* Enable various input drivers */
280292
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
281293
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
282-
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
283294
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
284295
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
285296
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
@@ -293,6 +304,7 @@
293304
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
294305
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
295306
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
307+
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
296308
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
297309
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
298310
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
@@ -304,6 +316,7 @@
304316
/* Enable various sensor drivers */
305317
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
306318
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
319+
#cmakedefine SDL_SENSOR_WINDOWS @SDL_SENSOR_WINDOWS@
307320
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
308321

309322
/* Enable various shared object loading systems */
@@ -335,6 +348,7 @@
335348
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
336349
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
337350
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
351+
#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
338352
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
339353
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
340354
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
@@ -403,6 +417,7 @@
403417
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
404418
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
405419
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
420+
#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
406421
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
407422
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
408423
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
@@ -431,7 +446,7 @@
431446
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
432447
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
433448

434-
#if !defined(__WIN32__)
449+
#if !defined(__WIN32__) && !defined(__WINRT__)
435450
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
436451
typedef unsigned int size_t;
437452
typedef signed char int8_t;

sdl2-sys/SDL2-2.0.14/include/SDL_config.h.in

+22-3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
#undef HAVE_WCSSTR
104104
#undef HAVE_WCSCMP
105105
#undef HAVE_WCSNCMP
106+
#undef HAVE_WCSCASECMP
107+
#undef HAVE__WCSICMP
108+
#undef HAVE_WCSNCASECMP
109+
#undef HAVE__WCSNICMP
106110
#undef HAVE_STRLEN
107111
#undef HAVE_STRLCPY
108112
#undef HAVE_STRLCAT
@@ -176,6 +180,8 @@
176180
#undef HAVE_SQRTF
177181
#undef HAVE_TAN
178182
#undef HAVE_TANF
183+
#undef HAVE_TRUNC
184+
#undef HAVE_TRUNCF
179185
#undef HAVE_FOPEN64
180186
#undef HAVE_FSEEKO
181187
#undef HAVE_FSEEKO64
@@ -193,6 +199,7 @@
193199
#undef HAVE_PTHREAD_SET_NAME_NP
194200
#undef HAVE_SEM_TIMEDWAIT
195201
#undef HAVE_GETAUXVAL
202+
#undef HAVE_ELF_AUX_INFO
196203
#undef HAVE_POLL
197204
#undef HAVE__EXIT
198205

@@ -204,19 +211,26 @@
204211

205212
#undef HAVE_ALTIVEC_H
206213
#undef HAVE_DBUS_DBUS_H
207-
#undef HAVE_FCITX_FRONTEND_H
214+
#undef HAVE_FCITX
215+
#undef HAVE_SYS_INOTIFY_H
216+
#undef HAVE_INOTIFY_INIT
217+
#undef HAVE_INOTIFY_INIT1
218+
#undef HAVE_INOTIFY
208219
#undef HAVE_IBUS_IBUS_H
209220
#undef HAVE_IMMINTRIN_H
210-
#undef HAVE_LIBSAMPLERATE_H
211221
#undef HAVE_LIBUDEV_H
222+
#undef HAVE_LIBSAMPLERATE_H
212223

213224
#undef HAVE_DDRAW_H
214225
#undef HAVE_DINPUT_H
215226
#undef HAVE_DSOUND_H
216227
#undef HAVE_DXGI_H
217228
#undef HAVE_XINPUT_H
229+
218230
#undef HAVE_MMDEVICEAPI_H
219231
#undef HAVE_AUDIOCLIENT_H
232+
#undef HAVE_SENSORSAPI_H
233+
220234
#undef HAVE_XINPUT_GAMEPAD_EX
221235
#undef HAVE_XINPUT_STATE_EX
222236

@@ -276,20 +290,23 @@
276290

277291
/* Enable various input drivers */
278292
#undef SDL_INPUT_LINUXEV
293+
#undef SDL_INPUT_FBSDKBIO
279294
#undef SDL_INPUT_LINUXKD
280-
#undef SDL_INPUT_TSLIB
281295
#undef SDL_JOYSTICK_HAIKU
282296
#undef SDL_JOYSTICK_DINPUT
283297
#undef SDL_JOYSTICK_XINPUT
284298
#undef SDL_JOYSTICK_DUMMY
285299
#undef SDL_JOYSTICK_IOKIT
300+
#undef SDL_JOYSTICK_MFI
286301
#undef SDL_JOYSTICK_LINUX
287302
#undef SDL_JOYSTICK_ANDROID
288303
#undef SDL_JOYSTICK_WINMM
289304
#undef SDL_JOYSTICK_USBHID
290305
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
291306
#undef SDL_JOYSTICK_HIDAPI
307+
#undef SDL_JOYSTICK_RAWINPUT
292308
#undef SDL_JOYSTICK_EMSCRIPTEN
309+
#undef SDL_JOYSTICK_VIRTUAL
293310
#undef SDL_HAPTIC_DUMMY
294311
#undef SDL_HAPTIC_ANDROID
295312
#undef SDL_HAPTIC_LINUX
@@ -299,6 +316,8 @@
299316

300317
/* Enable various sensor drivers */
301318
#undef SDL_SENSOR_ANDROID
319+
#undef SDL_SENSOR_COREMOTION
320+
#undef SDL_SENSOR_WINDOWS
302321
#undef SDL_SENSOR_DUMMY
303322

304323
/* Enable various shared object loading systems */

sdl2-sys/SDL2-2.0.14/include/SDL_config_android.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@
121121
#define HAVE_SQRTF 1
122122
#define HAVE_TAN 1
123123
#define HAVE_TANF 1
124+
#define HAVE_TRUNC 1
125+
#define HAVE_TRUNCF 1
124126
#define HAVE_SIGACTION 1
125127
#define HAVE_SETJMP 1
126128
#define HAVE_NANOSLEEP 1
@@ -136,8 +138,9 @@
136138

137139
/* Enable various input drivers */
138140
#define SDL_JOYSTICK_ANDROID 1
139-
#define SDL_JOYSTICK_HIDAPI 1
140-
#define SDL_HAPTIC_ANDROID 1
141+
#define SDL_JOYSTICK_HIDAPI 1
142+
#define SDL_JOYSTICK_VIRTUAL 1
143+
#define SDL_HAPTIC_ANDROID 1
141144

142145
/* Enable sensor driver */
143146
#define SDL_SENSOR_ANDROID 1

sdl2-sys/SDL2-2.0.14/include/SDL_config_iphoneos.h

+10-9
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@
122122
#define HAVE_SQRTF 1
123123
#define HAVE_TAN 1
124124
#define HAVE_TANF 1
125+
#define HAVE_TRUNC 1
126+
#define HAVE_TRUNCF 1
125127
#define HAVE_SIGACTION 1
126128
#define HAVE_SETJMP 1
127129
#define HAVE_NANOSLEEP 1
@@ -136,9 +138,11 @@
136138
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
137139
#define SDL_HAPTIC_DUMMY 1
138140

139-
/* Enable MFi joystick support */
141+
/* Enable joystick support */
142+
/* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
143+
/*#define SDL_JOYSTICK_HIDAPI 1*/
140144
#define SDL_JOYSTICK_MFI 1
141-
#define SDL_JOYSTICK_HIDAPI 1
145+
#define SDL_JOYSTICK_VIRTUAL 1
142146

143147
#ifdef __TVOS__
144148
#define SDL_SENSOR_DUMMY 1
@@ -167,8 +171,10 @@
167171
#define SDL_VIDEO_RENDER_OGL_ES 1
168172
#define SDL_VIDEO_RENDER_OGL_ES2 1
169173

170-
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */
171-
#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))
174+
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
175+
Also supported in simulator from iOS 13.0 and tvOS 13.0
176+
*/
177+
#if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
172178
#define SDL_PLATFORM_SUPPORTS_METAL 1
173179
#else
174180
#define SDL_PLATFORM_SUPPORTS_METAL 0
@@ -195,11 +201,6 @@
195201
/* enable iOS extended launch screen */
196202
#define SDL_IPHONE_LAUNCHSCREEN 1
197203

198-
/* Set max recognized G-force from accelerometer
199-
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
200-
*/
201-
#define SDL_IPHONE_MAX_GFORCE 5.0
202-
203204
/* enable filesystem support */
204205
#define SDL_FILESYSTEM_COCOA 1
205206

sdl2-sys/SDL2-2.0.14/include/SDL_config_macosx.h

+10-2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@
125125
#define HAVE_SQRTF 1
126126
#define HAVE_TAN 1
127127
#define HAVE_TANF 1
128+
#define HAVE_TRUNC 1
129+
#define HAVE_TRUNCF 1
128130
#define HAVE_SIGACTION 1
129131
#define HAVE_SETJMP 1
130132
#define HAVE_NANOSLEEP 1
@@ -139,10 +141,16 @@
139141
#define SDL_AUDIO_DRIVER_DUMMY 1
140142

141143
/* Enable various input drivers */
144+
#define SDL_JOYSTICK_HIDAPI 1
142145
#define SDL_JOYSTICK_IOKIT 1
143-
#define SDL_JOYSTICK_HIDAPI 1
146+
#define SDL_JOYSTICK_VIRTUAL 1
144147
#define SDL_HAPTIC_IOKIT 1
145148

149+
/* The MFI controller support requires ARC Objective C runtime */
150+
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
151+
#define SDL_JOYSTICK_MFI 1
152+
#endif
153+
146154
/* Enable the dummy sensor driver */
147155
#define SDL_SENSOR_DUMMY 1
148156

@@ -195,7 +203,7 @@
195203
#endif
196204

197205
/* Metal only supported on 64-bit architectures with 10.11+ */
198-
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
206+
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
199207
#define SDL_PLATFORM_SUPPORTS_METAL 1
200208
#else
201209
#define SDL_PLATFORM_SUPPORTS_METAL 0

sdl2-sys/SDL2-2.0.14/include/SDL_config_os2.h

+14-6
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,37 @@
2727

2828
#define SDL_AUDIO_DRIVER_DUMMY 1
2929
#define SDL_AUDIO_DRIVER_DISK 1
30+
#define SDL_AUDIO_DRIVER_OS2 1
3031

3132
#define SDL_POWER_DISABLED 1
3233
#define SDL_JOYSTICK_DISABLED 1
3334
#define SDL_HAPTIC_DISABLED 1
3435
/*#undef SDL_JOYSTICK_HIDAPI */
36+
/*#undef SDL_JOYSTICK_VIRTUAL */
3537

3638
#define SDL_SENSOR_DUMMY 1
3739
#define SDL_VIDEO_DRIVER_DUMMY 1
40+
#define SDL_VIDEO_DRIVER_OS2 1
3841

3942
/* Enable OpenGL support */
4043
/* #undef SDL_VIDEO_OPENGL */
4144

4245
/* Enable Vulkan support */
4346
/* #undef SDL_VIDEO_VULKAN */
4447

45-
#define SDL_LOADSO_DISABLED 1
46-
#define SDL_THREADS_DISABLED 1
47-
#define SDL_TIMERS_DISABLED 1
48-
#define SDL_FILESYSTEM_DUMMY 1
48+
#define SDL_THREAD_OS2 1
49+
#define SDL_LOADSO_OS2 1
50+
#define SDL_TIMER_OS2 1
51+
#define SDL_FILESYSTEM_OS2 1
4952

5053
/* Enable assembly routines */
5154
#define SDL_ASSEMBLY_ROUTINES 1
5255

53-
/* #undef HAVE_LIBSAMPLERATE_H */
56+
/* use libsamplerate for audio rate conversion. */
57+
/*#define HAVE_LIBSAMPLERATE_H 1 */
5458

5559
/* Enable dynamic libsamplerate support */
56-
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
60+
#define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL"
5761

5862
#define HAVE_LIBC 1
5963

@@ -99,6 +103,8 @@
99103
#define HAVE_WCSLCPY 1
100104
#define HAVE_WCSLCAT 1
101105
#define HAVE_WCSCMP 1
106+
#define HAVE__WCSICMP 1
107+
#define HAVE__WCSNICMP 1
102108
#define HAVE_STRLEN 1
103109
#define HAVE_STRLCPY 1
104110
#define HAVE_STRLCAT 1
@@ -176,5 +182,7 @@
176182
/* #undef HAVE_SQRTF */
177183
#define HAVE_TAN 1
178184
/* #undef HAVE_TANF */
185+
/* #undef HAVE_TRUNC */
186+
/* #undef HAVE_TRUNCF */
179187

180188
#endif /* SDL_config_os2_h_ */

sdl2-sys/SDL2-2.0.14/include/SDL_config_pandora.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
#define HAVE_SQRTF 1
103103
#define HAVE_TAN 1
104104
#define HAVE_TANF 1
105+
#define HAVE_TRUNC 1
106+
#define HAVE_TRUNCF 1
105107
#define HAVE_SIGACTION 1
106108
#define HAVE_SETJMP 1
107109
#define HAVE_NANOSLEEP 1
@@ -110,8 +112,8 @@
110112
#define SDL_AUDIO_DRIVER_OSS 1
111113

112114
#define SDL_INPUT_LINUXEV 1
113-
#define SDL_INPUT_TSLIB 1
114115
#define SDL_JOYSTICK_LINUX 1
116+
#define SDL_JOYSTICK_VIRTUAL 1
115117
#define SDL_HAPTIC_LINUX 1
116118

117119
#define SDL_SENSOR_DUMMY 1

0 commit comments

Comments
 (0)