Skip to content

Commit 073c032

Browse files
committed
Updated SDL2 to 2.0.10
Using official build from https://www.libsdl.org/download-2.0.php
1 parent 43b5384 commit 073c032

Some content is hidden

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

84 files changed

+4550
-594
lines changed

libs/SDL2/x64/SDL2.dll

396 KB
Binary file not shown.

libs/SDL2/x64/SDL2.lib

24.7 KB
Binary file not shown.

libs/SDL2/x64/SDL2main.lib

-40.7 KB
Binary file not shown.

libs/SDL2/x86/SDL2.dll

356 KB
Binary file not shown.

libs/SDL2/x86/SDL2.lib

24.5 KB
Binary file not shown.

libs/SDL2/x86/SDL2main.lib

-41.1 KB
Binary file not shown.

libs/includewin32/SDL2/SDL.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2016 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2019 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
@@ -26,8 +26,8 @@
2626
*/
2727

2828

29-
#ifndef _SDL_H
30-
#define _SDL_H
29+
#ifndef SDL_h_
30+
#define SDL_h_
3131

3232
#include "SDL_main.h"
3333
#include "SDL_stdinc.h"
@@ -40,17 +40,19 @@
4040
#include "SDL_error.h"
4141
#include "SDL_events.h"
4242
#include "SDL_filesystem.h"
43-
#include "SDL_joystick.h"
4443
#include "SDL_gamecontroller.h"
4544
#include "SDL_haptic.h"
4645
#include "SDL_hints.h"
46+
#include "SDL_joystick.h"
4747
#include "SDL_loadso.h"
4848
#include "SDL_log.h"
4949
#include "SDL_messagebox.h"
5050
#include "SDL_mutex.h"
5151
#include "SDL_power.h"
5252
#include "SDL_render.h"
5353
#include "SDL_rwops.h"
54+
#include "SDL_sensor.h"
55+
#include "SDL_shape.h"
5456
#include "SDL_system.h"
5557
#include "SDL_thread.h"
5658
#include "SDL_timer.h"
@@ -79,10 +81,11 @@ extern "C" {
7981
#define SDL_INIT_HAPTIC 0x00001000u
8082
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
8183
#define SDL_INIT_EVENTS 0x00004000u
84+
#define SDL_INIT_SENSOR 0x00008000u
8285
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
8386
#define SDL_INIT_EVERYTHING ( \
8487
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
85-
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
88+
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
8689
)
8790
/* @} */
8891

@@ -127,6 +130,6 @@ extern DECLSPEC void SDLCALL SDL_Quit(void);
127130
#endif
128131
#include "close_code.h"
129132

130-
#endif /* _SDL_H */
133+
#endif /* SDL_h_ */
131134

132135
/* vi: set ts=4 sw=4 expandtab: */

libs/includewin32/SDL2/SDL_assert.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2016 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2019 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
@@ -19,8 +19,8 @@
1919
3. This notice may not be removed or altered from any source distribution.
2020
*/
2121

22-
#ifndef _SDL_assert_h
23-
#define _SDL_assert_h
22+
#ifndef SDL_assert_h_
23+
#define SDL_assert_h_
2424

2525
#include "SDL_config.h"
2626

@@ -51,9 +51,11 @@ assert can have unique static variables associated with it.
5151
/* Don't include intrin.h here because it contains C++ code */
5252
extern void __cdecl __debugbreak(void);
5353
#define SDL_TriggerBreakpoint() __debugbreak()
54-
#elif (!defined(__NACL__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
54+
#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(HAVE_SIGNAL_H)
56+
#elif defined(__386__) && defined(__WATCOMC__)
57+
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
58+
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
5759
#include <signal.h>
5860
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
5961
#else
@@ -63,7 +65,7 @@ assert can have unique static variables associated with it.
6365

6466
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
6567
# define SDL_FUNCTION __func__
66-
#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
68+
#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
6769
# define SDL_FUNCTION __FUNCTION__
6870
#else
6971
# define SDL_FUNCTION "???"
@@ -201,7 +203,7 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
201203
*
202204
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
203205
*
204-
* \return SDL_AssertState value of how to handle the assertion failure.
206+
* Return SDL_AssertState value of how to handle the assertion failure.
205207
*
206208
* \param handler Callback function, called when an assertion fails.
207209
* \param userdata A pointer passed to the callback as-is.
@@ -250,7 +252,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
250252
* <code>
251253
* const SDL_AssertData *item = SDL_GetAssertionReport();
252254
* while (item) {
253-
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
255+
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
254256
* item->condition, item->function, item->filename,
255257
* item->linenum, item->trigger_count,
256258
* item->always_ignore ? "yes" : "no");
@@ -284,6 +286,6 @@ extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
284286
#endif
285287
#include "close_code.h"
286288

287-
#endif /* _SDL_assert_h */
289+
#endif /* SDL_assert_h_ */
288290

289291
/* vi: set ts=4 sw=4 expandtab: */

libs/includewin32/SDL2/SDL_atomic.h

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2016 Sam Lantinga <[email protected]>
3+
Copyright (C) 1997-2019 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
@@ -56,8 +56,8 @@
5656
* All of the atomic operations that modify memory are full memory barriers.
5757
*/
5858

59-
#ifndef _SDL_atomic_h_
60-
#define _SDL_atomic_h_
59+
#ifndef SDL_atomic_h_
60+
#define SDL_atomic_h_
6161

6262
#include "SDL_stdinc.h"
6363
#include "SDL_platform.h"
@@ -118,13 +118,16 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
118118
* The compiler barrier prevents the compiler from reordering
119119
* reads and writes to globally visible variables across the call.
120120
*/
121-
#if defined(_MSC_VER) && (_MSC_VER > 1200)
121+
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
122122
void _ReadWriteBarrier(void);
123123
#pragma intrinsic(_ReadWriteBarrier)
124124
#define SDL_CompilerBarrier() _ReadWriteBarrier()
125125
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
126126
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
127127
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
128+
#elif defined(__WATCOMC__)
129+
extern _inline void SDL_CompilerBarrier (void);
130+
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
128131
#else
129132
#define SDL_CompilerBarrier() \
130133
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
@@ -149,25 +152,49 @@ void _ReadWriteBarrier(void);
149152
* For more information on these semantics, take a look at the blog post:
150153
* http://preshing.com/20120913/acquire-and-release-semantics
151154
*/
155+
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
156+
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
157+
152158
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
153159
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
154160
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
161+
#elif defined(__GNUC__) && defined(__aarch64__)
162+
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
163+
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
155164
#elif defined(__GNUC__) && defined(__arm__)
156-
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
165+
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
166+
/* Information from:
167+
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
168+
169+
The Linux kernel provides a helper function which provides the right code for a memory barrier,
170+
hard-coded at address 0xffff0fa0
171+
*/
172+
typedef void (*SDL_KernelMemoryBarrierFunc)();
173+
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
174+
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
175+
#elif 0 /* defined(__QNXNTO__) */
176+
#include <sys/cpuinline.h>
177+
178+
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
179+
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
180+
#else
181+
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
157182
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
158183
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
159-
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
184+
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
160185
#ifdef __thumb__
161186
/* The mcr instruction isn't available in thumb mode, use real functions */
162-
extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease();
163-
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
187+
#define SDL_MEMORY_BARRIER_USES_FUNCTION
188+
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
189+
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
164190
#else
165191
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
166192
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
167193
#endif /* __thumb__ */
168194
#else
169195
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
170196
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
197+
#endif /* __LINUX__ || __ANDROID__ */
171198
#endif /* __GNUC__ && __arm__ */
172199
#else
173200
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
@@ -263,6 +290,6 @@ extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
263290

264291
#include "close_code.h"
265292

266-
#endif /* _SDL_atomic_h_ */
293+
#endif /* SDL_atomic_h_ */
267294

268295
/* vi: set ts=4 sw=4 expandtab: */

0 commit comments

Comments
 (0)