Skip to content

Commit 8ed2019

Browse files
authored
Merge pull request Rust-SDL2#1027 from aclysma/update-bunded-to-2.0.12
Update bundled SDL2 to 2.0.12
2 parents 2217bc7 + daf38c5 commit 8ed2019

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+621
-167
lines changed

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
In this file will be listed the changes, especially the breaking ones that one should be careful of
22
when upgrading from a version of rust-sdl2 to another.
33

4+
### Unreleased
5+
6+
* Upgraded the "bundled" version of SDL2 to 2.0.12
7+
48
### v0.34.3
59

610
[PR #1020](https://github.com/Rust-SDL2/rust-sdl2/pull/1020): revert undefined behavior introduction.

sdl2-sys/SDL2-2.0.10/include/SDL_revision.h

-2
This file was deleted.

sdl2-sys/SDL2-2.0.10/include/SDL.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -47,6 +47,7 @@
4747
#include "SDL_loadso.h"
4848
#include "SDL_log.h"
4949
#include "SDL_messagebox.h"
50+
#include "SDL_metal.h"
5051
#include "SDL_mutex.h"
5152
#include "SDL_power.h"
5253
#include "SDL_render.h"

sdl2-sys/SDL2-2.0.10/include/SDL_assert.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_assert.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

sdl2-sys/SDL2-2.0.10/include/SDL_atomic.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_atomic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

sdl2-sys/SDL2-2.0.10/include/SDL_audio.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_audio.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

sdl2-sys/SDL2-2.0.10/include/SDL_bits.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_bits.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

sdl2-sys/SDL2-2.0.10/include/SDL_blendmode.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_blendmode.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -50,6 +50,9 @@ typedef enum
5050
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
5151
dstRGB = srcRGB * dstRGB
5252
dstA = dstA */
53+
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
54+
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
55+
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
5356
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
5457

5558
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */

sdl2-sys/SDL2-2.0.10/include/SDL_clipboard.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_clipboard.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

sdl2-sys/SDL2-2.0.10/include/SDL_config.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages

sdl2-sys/SDL2-2.0.10/include/SDL_config.h.cmake renamed to sdl2-sys/SDL2-2.0.12/include/SDL_config.h.cmake

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44

55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -96,7 +96,10 @@
9696
#cmakedefine HAVE_WCSLEN 1
9797
#cmakedefine HAVE_WCSLCPY 1
9898
#cmakedefine HAVE_WCSLCAT 1
99+
#cmakedefine HAVE_WCSDUP 1
100+
#cmakedefine HAVE_WCSSTR 1
99101
#cmakedefine HAVE_WCSCMP 1
102+
#cmakedefine HAVE_WCSNCMP 1
100103
#cmakedefine HAVE_STRLEN 1
101104
#cmakedefine HAVE_STRLCPY 1
102105
#cmakedefine HAVE_STRLCAT 1
@@ -108,6 +111,8 @@
108111
#cmakedefine HAVE_STRCHR 1
109112
#cmakedefine HAVE_STRRCHR 1
110113
#cmakedefine HAVE_STRSTR 1
114+
#cmakedefine HAVE_STRTOK_R 1
115+
#cmakedefine HAVE_STRTOK_S 1
111116
#cmakedefine HAVE_ITOA 1
112117
#cmakedefine HAVE__LTOA 1
113118
#cmakedefine HAVE__UITOA 1
@@ -127,6 +132,7 @@
127132
#cmakedefine HAVE_STRCASECMP 1
128133
#cmakedefine HAVE__STRNICMP 1
129134
#cmakedefine HAVE_STRNCASECMP 1
135+
#cmakedefine HAVE_SSCANF 1
130136
#cmakedefine HAVE_VSSCANF 1
131137
#cmakedefine HAVE_VSNPRINTF 1
132138
#cmakedefine HAVE_M_PI 1
@@ -211,7 +217,6 @@
211217
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
212218
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
213219

214-
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
215220
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
216221
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
217222

@@ -294,9 +299,11 @@
294299
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
295300
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
296301
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
302+
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
297303

298304
/* Enable various sensor drivers */
299305
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
306+
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
300307
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
301308

302309
/* Enable various shared object loading systems */
@@ -322,9 +329,11 @@
322329
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
323330
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
324331
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
332+
#cmakedefine SDL_VIDEO_DRIVER_UIKIT @SDL_VIDEO_DRIVER_UIKIT@
325333
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
326334
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
327335
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
336+
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
328337
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
329338
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
330339
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
@@ -387,11 +396,15 @@
387396
/* Enable Vulkan support */
388397
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
389398

399+
/* Enable Metal support */
400+
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
401+
390402
/* Enable system power support */
391403
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
392404
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
393405
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
394406
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
407+
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
395408
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
396409
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
397410
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
@@ -408,11 +421,16 @@
408421
/* Enable assembly routines */
409422
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
410423
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
424+
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
425+
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
411426

412427
/* Enable dynamic libsamplerate support */
413428
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
414429

415430
/* Platform specific definitions */
431+
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
432+
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
433+
416434
#if !defined(__WIN32__)
417435
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
418436
typedef unsigned int size_t;

sdl2-sys/SDL2-2.0.10/include/SDL_config.h.in renamed to sdl2-sys/SDL2-2.0.12/include/SDL_config.h.in

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -33,7 +33,7 @@
3333

3434
/* Make sure that this isn't included by Visual C++ */
3535
#ifdef _MSC_VER
36-
#error You should run hg revert SDL_config.h
36+
#error You should run hg revert SDL_config.h
3737
#endif
3838

3939
/* C language features */
@@ -99,7 +99,10 @@
9999
#undef HAVE_WCSLEN
100100
#undef HAVE_WCSLCPY
101101
#undef HAVE_WCSLCAT
102+
#undef HAVE_WCSDUP
103+
#undef HAVE_WCSSTR
102104
#undef HAVE_WCSCMP
105+
#undef HAVE_WCSNCMP
103106
#undef HAVE_STRLEN
104107
#undef HAVE_STRLCPY
105108
#undef HAVE_STRLCAT
@@ -111,6 +114,8 @@
111114
#undef HAVE_STRCHR
112115
#undef HAVE_STRRCHR
113116
#undef HAVE_STRSTR
117+
#undef HAVE_STRTOK_R
118+
#undef HAVE_STRTOK_S
114119
#undef HAVE_ITOA
115120
#undef HAVE__LTOA
116121
#undef HAVE__UITOA
@@ -192,9 +197,9 @@
192197
#undef HAVE__EXIT
193198

194199
#else
195-
#define HAVE_STDARG_H 1
196-
#define HAVE_STDDEF_H 1
197-
#define HAVE_STDINT_H 1
200+
#define HAVE_STDARG_H 1
201+
#define HAVE_STDDEF_H 1
202+
#define HAVE_STDINT_H 1
198203
#endif /* HAVE_LIBC */
199204

200205
#undef HAVE_ALTIVEC_H
@@ -210,7 +215,6 @@
210215
#undef HAVE_DSOUND_H
211216
#undef HAVE_DXGI_H
212217
#undef HAVE_XINPUT_H
213-
#undef HAVE_ENDPOINTVOLUME_H
214218
#undef HAVE_MMDEVICEAPI_H
215219
#undef HAVE_AUDIOCLIENT_H
216220
#undef HAVE_XINPUT_GAMEPAD_EX
@@ -383,6 +387,9 @@
383387
/* Enable Vulkan support */
384388
#undef SDL_VIDEO_VULKAN
385389

390+
/* Enable Metal support */
391+
#undef SDL_VIDEO_METAL
392+
386393
/* Enable system power support */
387394
#undef SDL_POWER_LINUX
388395
#undef SDL_POWER_WINDOWS
@@ -405,13 +412,18 @@
405412
/* Enable assembly routines */
406413
#undef SDL_ASSEMBLY_ROUTINES
407414
#undef SDL_ALTIVEC_BLITTERS
415+
#undef SDL_ARM_SIMD_BLITTERS
416+
#undef SDL_ARM_NEON_BLITTERS
408417

409418
/* Enable ime support */
410419
#undef SDL_USE_IME
411420

412421
/* Enable dynamic udev support */
413422
#undef SDL_UDEV_DYNAMIC
414423

424+
/* Enable dynamic libusb support */
425+
#undef SDL_LIBUSB_DYNAMIC
426+
415427
/* Enable dynamic libsamplerate support */
416428
#undef SDL_LIBSAMPLERATE_DYNAMIC
417429

sdl2-sys/SDL2-2.0.10/include/SDL_config_android.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_config_android.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
7171
#define HAVE_STRCHR 1
7272
#define HAVE_STRRCHR 1
7373
#define HAVE_STRSTR 1
74+
#define HAVE_STRTOK_R 1
7475
#define HAVE_STRTOL 1
7576
#define HAVE_STRTOUL 1
7677
#define HAVE_STRTOLL 1

sdl2-sys/SDL2-2.0.10/include/SDL_config_iphoneos.h renamed to sdl2-sys/SDL2-2.0.12/include/SDL_config_iphoneos.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
7171
#define HAVE_STRCHR 1
7272
#define HAVE_STRRCHR 1
7373
#define HAVE_STRSTR 1
74+
#define HAVE_STRTOK_R 1
7475
#define HAVE_STRTOL 1
7576
#define HAVE_STRTOUL 1
7677
#define HAVE_STRTOLL 1
@@ -137,7 +138,7 @@
137138

138139
/* Enable MFi joystick support */
139140
#define SDL_JOYSTICK_MFI 1
140-
/*#define SDL_JOYSTICK_HIDAPI 1*/
141+
#define SDL_JOYSTICK_HIDAPI 1
141142

142143
#ifdef __TVOS__
143144
#define SDL_SENSOR_DUMMY 1
@@ -181,6 +182,10 @@
181182
#define SDL_VIDEO_VULKAN 1
182183
#endif
183184

185+
#if SDL_PLATFORM_SUPPORTS_METAL
186+
#define SDL_VIDEO_METAL 1
187+
#endif
188+
184189
/* Enable system power support */
185190
#define SDL_POWER_UIKIT 1
186191

0 commit comments

Comments
 (0)