[iortcw] 14/95: All: Update SDL2 to 2.0.5
Simon McVittie
smcv at debian.org
Fri Sep 8 10:41:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to tag 1.51
in repository iortcw.
commit 303adb75b29a400e9c3dff8633e93f13580bd468
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Fri Jan 20 19:43:35 2017 -0500
All: Update SDL2 to 2.0.5
---
MP/Makefile | 4 +-
MP/code/SDL2/include/SDL.h | 20 ++--
MP/code/SDL2/include/SDL_audio.h | 95 ++++++++++++---
MP/code/SDL2/include/SDL_config.h.cmake | 2 +
MP/code/SDL2/include/SDL_config.h.in | 4 +
MP/code/SDL2/include/SDL_config_android.h | 3 +
MP/code/SDL2/include/SDL_config_iphoneos.h | 6 +-
MP/code/SDL2/include/SDL_events.h | 8 +-
MP/code/SDL2/include/SDL_gamecontroller.h | 6 +-
MP/code/SDL2/include/SDL_haptic.h | 32 ++---
MP/code/SDL2/include/SDL_hints.h | 112 ++++++++++++++---
MP/code/SDL2/include/SDL_joystick.h | 2 +-
MP/code/SDL2/include/SDL_keyboard.h | 2 +-
MP/code/SDL2/include/SDL_main.h | 2 +-
MP/code/SDL2/include/SDL_mouse.h | 6 +-
MP/code/SDL2/include/SDL_opengles.h | 1 +
MP/code/SDL2/include/SDL_opengles2.h | 2 +
MP/code/SDL2/include/SDL_pixels.h | 14 +++
MP/code/SDL2/include/SDL_platform.h | 14 ++-
MP/code/SDL2/include/SDL_render.h | 27 ++++-
MP/code/SDL2/include/SDL_revision.h | 4 +-
MP/code/SDL2/include/SDL_rwops.h | 12 +-
MP/code/SDL2/include/SDL_stdinc.h | 10 +-
MP/code/SDL2/include/SDL_surface.h | 10 ++
MP/code/SDL2/include/SDL_syswm.h | 22 +++-
MP/code/SDL2/include/SDL_version.h | 2 +-
MP/code/SDL2/include/SDL_video.h | 133 +++++++++++++++++++--
MP/code/libs/linux32/libSDL2-2.0.so.0.4.0 | Bin 3781048 -> 0 bytes
MP/code/libs/linux32/libSDL2-2.0.so.0.4.1 | Bin 0 -> 3914648 bytes
MP/code/libs/linux32/libSDL2main.a | Bin 4424 -> 4424 bytes
.../code/libs/linux64/libSDL2-2.0.so.0.4.1 | Bin 4774662 -> 4937772 bytes
MP/code/libs/linux64/libSDL2main.a | Bin 6324 -> 6324 bytes
MP/code/libs/macosx/libSDL2-2.0.0.dylib | Bin 3939940 -> 3984540 bytes
MP/code/libs/macosx/libSDL2main.a | Bin 8516 -> 8516 bytes
MP/code/libs/win32/SDL2.dll | Bin 4797982 -> 1068544 bytes
MP/code/libs/win32/libSDL2.dll.a | Bin 356240 -> 364970 bytes
MP/code/libs/win32/libSDL2main.a | Bin 8808 -> 8748 bytes
MP/code/libs/win64/SDL264.dll | Bin 6573422 -> 1254400 bytes
MP/code/libs/win64/libSDL264.dll.a | Bin 349446 -> 358020 bytes
MP/code/libs/win64/libSDL264main.a | Bin 11074 -> 10876 bytes
SP/Makefile | 4 +-
SP/code/SDL2/include/SDL.h | 20 ++--
SP/code/SDL2/include/SDL_audio.h | 95 ++++++++++++---
SP/code/SDL2/include/SDL_config.h.cmake | 2 +
SP/code/SDL2/include/SDL_config.h.in | 4 +
SP/code/SDL2/include/SDL_config_android.h | 3 +
SP/code/SDL2/include/SDL_config_iphoneos.h | 6 +-
SP/code/SDL2/include/SDL_events.h | 8 +-
SP/code/SDL2/include/SDL_gamecontroller.h | 6 +-
SP/code/SDL2/include/SDL_haptic.h | 32 ++---
SP/code/SDL2/include/SDL_hints.h | 112 ++++++++++++++---
SP/code/SDL2/include/SDL_joystick.h | 2 +-
SP/code/SDL2/include/SDL_keyboard.h | 2 +-
SP/code/SDL2/include/SDL_main.h | 2 +-
SP/code/SDL2/include/SDL_mouse.h | 6 +-
SP/code/SDL2/include/SDL_opengles.h | 1 +
SP/code/SDL2/include/SDL_opengles2.h | 2 +
SP/code/SDL2/include/SDL_pixels.h | 14 +++
SP/code/SDL2/include/SDL_platform.h | 14 ++-
SP/code/SDL2/include/SDL_render.h | 27 ++++-
SP/code/SDL2/include/SDL_revision.h | 4 +-
SP/code/SDL2/include/SDL_rwops.h | 12 +-
SP/code/SDL2/include/SDL_stdinc.h | 10 +-
SP/code/SDL2/include/SDL_surface.h | 10 ++
SP/code/SDL2/include/SDL_syswm.h | 22 +++-
SP/code/SDL2/include/SDL_version.h | 2 +-
SP/code/SDL2/include/SDL_video.h | 133 +++++++++++++++++++--
SP/code/libs/linux32/libSDL2-2.0.so.0.4.0 | Bin 3781048 -> 0 bytes
SP/code/libs/linux32/libSDL2-2.0.so.0.4.1 | Bin 0 -> 3914648 bytes
SP/code/libs/linux32/libSDL2main.a | Bin 4424 -> 4424 bytes
.../code/libs/linux64/libSDL2-2.0.so.0.4.1 | Bin 4774662 -> 4937772 bytes
SP/code/libs/linux64/libSDL2main.a | Bin 6324 -> 6324 bytes
SP/code/libs/macosx/libSDL2-2.0.0.dylib | Bin 3939940 -> 3984540 bytes
SP/code/libs/macosx/libSDL2main.a | Bin 8516 -> 8516 bytes
SP/code/libs/win32/SDL2.dll | Bin 4797982 -> 1068544 bytes
SP/code/libs/win32/libSDL2.dll.a | Bin 356240 -> 364970 bytes
SP/code/libs/win32/libSDL2main.a | Bin 8808 -> 8748 bytes
SP/code/libs/win64/SDL264.dll | Bin 6573422 -> 1254400 bytes
SP/code/libs/win64/libSDL264.dll.a | Bin 349446 -> 358020 bytes
SP/code/libs/win64/libSDL264main.a | Bin 11074 -> 10876 bytes
80 files changed, 912 insertions(+), 198 deletions(-)
diff --git a/MP/Makefile b/MP/Makefile
index eaa55a4..0a07c9e 100644
--- a/MP/Makefile
+++ b/MP/Makefile
@@ -427,11 +427,11 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")
ifeq ($(CROSS_COMPILING),1)
ifeq ($(ARCH),x86)
SDL_LIBS = $(LIBSDIR)/linux32/libSDL2main.a \
- $(LIBSDIR)/linux32/libSDL2-2.0.so.0.4.0
+ $(LIBSDIR)/linux32/libSDL2-2.0.so.0.4.1
endif
ifeq ($(ARCH),x86_64)
SDL_LIBS = $(LIBSDIR)/linux64/libSDL2main.a \
- $(LIBSDIR)/linux64/libSDL2-2.0.so.0.4.0
+ $(LIBSDIR)/linux64/libSDL2-2.0.so.0.4.1
endif
endif
endif
diff --git a/MP/code/SDL2/include/SDL.h b/MP/code/SDL2/include/SDL.h
index 7647b51..1a3fa28 100644
--- a/MP/code/SDL2/include/SDL.h
+++ b/MP/code/SDL2/include/SDL.h
@@ -72,14 +72,14 @@ extern "C" {
* specify the subsystems which you will be using in your application.
*/
/* @{ */
-#define SDL_INIT_TIMER 0x00000001
-#define SDL_INIT_AUDIO 0x00000010
-#define SDL_INIT_VIDEO 0x00000020 /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
-#define SDL_INIT_JOYSTICK 0x00000200 /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
-#define SDL_INIT_HAPTIC 0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS 0x00004000
-#define SDL_INIT_NOPARACHUTE 0x00100000 /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER 0x00000001u
+#define SDL_INIT_AUDIO 0x00000010u
+#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC 0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS 0x00004000u
+#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
@@ -95,8 +95,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
* This function initializes specific SDL subsystems
*
* Subsystem initialization is ref-counted, you must call
- * SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
- * shutdown a subsystem manually (or call SDL_Quit to force shutdown).
+ * SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
+ * shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
* If a subsystem is already loaded then this call will
* increase the ref-count and return.
*/
diff --git a/MP/code/SDL2/include/SDL_audio.h b/MP/code/SDL2/include/SDL_audio.h
index 4f65521..d51f0d1 100644
--- a/MP/code/SDL2/include/SDL_audio.h
+++ b/MP/code/SDL2/include/SDL_audio.h
@@ -278,7 +278,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
* protect data structures that it accesses by calling SDL_LockAudio()
* and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL
* pointer here, and call SDL_QueueAudio() with some frequency, to queue
- * more audio samples to be played.
+ * more audio samples to be played (or for capture devices, call
+ * SDL_DequeueAudio() with some frequency, to obtain audio samples).
* - \c desired->userdata is passed as the first parameter to your callback
* function. If you passed a NULL callback, this value is ignored.
*
@@ -482,6 +483,10 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
/**
* Queue more audio on non-callback devices.
*
+ * (If you are looking to retrieve queued audio from a non-callback capture
+ * device, you want SDL_DequeueAudio() instead. This will return -1 to
+ * signify an error if you use it with capture devices.)
+ *
* SDL offers two ways to feed audio to the device: you can either supply a
* callback that SDL triggers with some frequency to obtain more audio
* (pull method), or you can supply no callback, and then SDL will expect
@@ -517,20 +522,75 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
/**
+ * Dequeue more audio on non-callback devices.
+ *
+ * (If you are looking to queue audio for output on a non-callback playback
+ * device, you want SDL_QueueAudio() instead. This will always return 0
+ * if you use it with playback devices.)
+ *
+ * SDL offers two ways to retrieve audio from a capture device: you can
+ * either supply a callback that SDL triggers with some frequency as the
+ * device records more audio data, (push method), or you can supply no
+ * callback, and then SDL will expect you to retrieve data at regular
+ * intervals (pull method) with this function.
+ *
+ * There are no limits on the amount of data you can queue, short of
+ * exhaustion of address space. Data from the device will keep queuing as
+ * necessary without further intervention from you. This means you will
+ * eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ * Capture devices will not queue data when paused; if you are expecting
+ * to not need captured audio for some length of time, use
+ * SDL_PauseAudioDevice() to stop the capture device from queueing more
+ * data. This can be useful during, say, level loading times. When
+ * unpaused, capture devices will start queueing data from that point,
+ * having flushed any capturable data available while paused.
+ *
+ * This function is thread-safe, but dequeueing from the same device from
+ * two threads at once does not promise which thread will dequeued data
+ * first.
+ *
+ * You may not dequeue audio from a device that is using an
+ * application-supplied callback; doing so returns an error. You have to use
+ * the audio callback, or dequeue audio with this function, but not both.
+ *
+ * You should not call SDL_LockAudio() on the device before queueing; SDL
+ * handles locking internally for this function.
+ *
+ * \param dev The device ID from which we will dequeue audio.
+ * \param data A pointer into where audio data should be copied.
+ * \param len The number of bytes (not samples!) to which (data) points.
+ * \return number of bytes dequeued, which could be less than requested.
+ *
+ * \sa SDL_GetQueuedAudioSize
+ * \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
+
+/**
* Get the number of bytes of still-queued audio.
*
- * This is the number of bytes that have been queued for playback with
- * SDL_QueueAudio(), but have not yet been sent to the hardware.
+ * For playback device:
+ *
+ * This is the number of bytes that have been queued for playback with
+ * SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ * number may shrink at any time, so this only informs of pending data.
+ *
+ * Once we've sent it to the hardware, this function can not decide the
+ * exact byte boundary of what has been played. It's possible that we just
+ * gave the hardware several kilobytes right before you called this
+ * function, but it hasn't played any of it yet, or maybe half of it, etc.
+ *
+ * For capture devices:
*
- * Once we've sent it to the hardware, this function can not decide the exact
- * byte boundary of what has been played. It's possible that we just gave the
- * hardware several kilobytes right before you called this function, but it
- * hasn't played any of it yet, or maybe half of it, etc.
+ * This is the number of bytes that have been captured by the device and
+ * are waiting for you to dequeue. This number may grow at any time, so
+ * this only informs of the lower-bound of available data.
*
* You may not queue audio on a device that is using an application-supplied
* callback; calling this function on such a device always returns 0.
- * You have to use the audio callback or queue audio with SDL_QueueAudio(),
- * but not both.
+ * You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before querying; SDL
* handles locking internally for this function.
@@ -544,10 +604,17 @@ extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *da
extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
/**
- * Drop any queued audio data waiting to be sent to the hardware.
+ * Drop any queued audio data. For playback devices, this is any queued data
+ * still waiting to be submitted to the hardware. For capture devices, this
+ * is any data that was queued by the device that hasn't yet been dequeued by
+ * the application.
*
- * Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- * the hardware will start playing silence if more audio isn't queued.
+ * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ * playback devices, the hardware will start playing silence if more audio
+ * isn't queued. Unpaused capture devices will start filling the queue again
+ * as soon as they have more data available (which, depending on the state
+ * of the hardware and the thread, could be before this function call
+ * returns!).
*
* This will not prevent playback of queued audio that's already been sent
* to the hardware, as we can not undo that, so expect there to be some
@@ -557,8 +624,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
*
* You may not queue audio on a device that is using an application-supplied
* callback; calling this function on such a device is always a no-op.
- * You have to use the audio callback or queue audio with SDL_QueueAudio(),
- * but not both.
+ * You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before clearing the
* queue; SDL handles locking internally for this function.
diff --git a/MP/code/SDL2/include/SDL_config.h.cmake b/MP/code/SDL2/include/SDL_config.h.cmake
index 44173a0..98c62a9 100644
--- a/MP/code/SDL2/include/SDL_config.h.cmake
+++ b/MP/code/SDL2/include/SDL_config.h.cmake
@@ -81,6 +81,8 @@
#cmakedefine HAVE_PTHREAD_NP_H 1
#cmakedefine HAVE_LIBUDEV_H 1
#cmakedefine HAVE_DBUS_DBUS_H 1
+#cmakedefine HAVE_IBUS_IBUS_H 1
+#cmakedefine HAVE_FCITX_FRONTEND_H 1
/* C library functions */
#cmakedefine HAVE_MALLOC 1
diff --git a/MP/code/SDL2/include/SDL_config.h.in b/MP/code/SDL2/include/SDL_config.h.in
index 2071be4..d610cd6 100644
--- a/MP/code/SDL2/include/SDL_config.h.in
+++ b/MP/code/SDL2/include/SDL_config.h.in
@@ -82,6 +82,7 @@
#undef HAVE_LIBUDEV_H
#undef HAVE_DBUS_DBUS_H
#undef HAVE_IBUS_IBUS_H
+#undef HAVE_FCITX_FRONTEND_H
/* C library functions */
#undef HAVE_MALLOC
@@ -356,4 +357,7 @@
#undef SDL_ASSEMBLY_ROUTINES
#undef SDL_ALTIVEC_BLITTERS
+/* Enable ime support */
+#undef SDL_USE_IME
+
#endif /* _SDL_config_h */
diff --git a/MP/code/SDL2/include/SDL_config_android.h b/MP/code/SDL2/include/SDL_config_android.h
index a388ba8..996cf76 100644
--- a/MP/code/SDL2/include/SDL_config_android.h
+++ b/MP/code/SDL2/include/SDL_config_android.h
@@ -43,6 +43,7 @@
#define HAVE_STDINT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
/* C library functions */
#define HAVE_MALLOC 1
@@ -75,6 +76,7 @@
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
+#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRCASECMP 1
@@ -101,6 +103,7 @@
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
+#define HAVE_SIGACTION 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
#define HAVE_SYSCONF 1
diff --git a/MP/code/SDL2/include/SDL_config_iphoneos.h b/MP/code/SDL2/include/SDL_config_iphoneos.h
index 304c892..470985f 100644
--- a/MP/code/SDL2/include/SDL_config_iphoneos.h
+++ b/MP/code/SDL2/include/SDL_config_iphoneos.h
@@ -119,11 +119,7 @@
#define SDL_JOYSTICK_MFI 1
/* Enable Unix style SO loading */
-/* Technically this works, but violates the iOS dev agreement prior to iOS 8 */
-/* #define SDL_LOADSO_DLOPEN 1 */
-
-/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
-#define SDL_LOADSO_DISABLED 1
+#define SDL_LOADSO_DLOPEN 1
/* Enable various threading systems */
#define SDL_THREAD_PTHREAD 1
diff --git a/MP/code/SDL2/include/SDL_events.h b/MP/code/SDL2/include/SDL_events.h
index 1437f4c..edb89ef 100644
--- a/MP/code/SDL2/include/SDL_events.h
+++ b/MP/code/SDL2/include/SDL_events.h
@@ -136,6 +136,9 @@ typedef enum
/* Drag and drop events */
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
+ SDL_DROPTEXT, /**< text/plain drag-and-drop event */
+ SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
+ SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
/* Audio hotplug events */
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
@@ -461,9 +464,10 @@ typedef struct SDL_DollarGestureEvent
*/
typedef struct SDL_DropEvent
{
- Uint32 type; /**< ::SDL_DROPFILE */
+ Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
Uint32 timestamp;
- char *file; /**< The file name, which should be freed with SDL_free() */
+ char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+ Uint32 windowID; /**< The window that was dropped on, if any */
} SDL_DropEvent;
diff --git a/MP/code/SDL2/include/SDL_gamecontroller.h b/MP/code/SDL2/include/SDL_gamecontroller.h
index 42087ee..e67fd9f 100644
--- a/MP/code/SDL2/include/SDL_gamecontroller.h
+++ b/MP/code/SDL2/include/SDL_gamecontroller.h
@@ -93,7 +93,7 @@ typedef struct SDL_GameControllerButtonBind
* }
* }
*
- * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
*
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
@@ -136,14 +136,14 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingStr
/**
* Get a mapping string for a GUID
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
/**
* Get a mapping string for an open GameController
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
diff --git a/MP/code/SDL2/include/SDL_haptic.h b/MP/code/SDL2/include/SDL_haptic.h
index b36d78b..9421c8f 100644
--- a/MP/code/SDL2/include/SDL_haptic.h
+++ b/MP/code/SDL2/include/SDL_haptic.h
@@ -149,7 +149,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_CONSTANT (1<<0)
+#define SDL_HAPTIC_CONSTANT (1u<<0)
/**
* \brief Sine wave effect supported.
@@ -158,7 +158,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SINE (1<<1)
+#define SDL_HAPTIC_SINE (1u<<1)
/**
* \brief Left/Right effect supported.
@@ -169,7 +169,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
* \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
* we ran out of bits, and this is important for XInput devices.
*/
-#define SDL_HAPTIC_LEFTRIGHT (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT (1u<<2)
/* !!! FIXME: put this back when we have more bits in 2.1 */
/* #define SDL_HAPTIC_SQUARE (1<<2) */
@@ -181,7 +181,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_TRIANGLE (1<<3)
+#define SDL_HAPTIC_TRIANGLE (1u<<3)
/**
* \brief Sawtoothup wave effect supported.
@@ -190,7 +190,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
/**
* \brief Sawtoothdown wave effect supported.
@@ -199,7 +199,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
/**
* \brief Ramp effect supported.
@@ -208,7 +208,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticRamp
*/
-#define SDL_HAPTIC_RAMP (1<<6)
+#define SDL_HAPTIC_RAMP (1u<<6)
/**
* \brief Spring effect supported - uses axes position.
@@ -218,7 +218,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_SPRING (1<<7)
+#define SDL_HAPTIC_SPRING (1u<<7)
/**
* \brief Damper effect supported - uses axes velocity.
@@ -228,7 +228,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_DAMPER (1<<8)
+#define SDL_HAPTIC_DAMPER (1u<<8)
/**
* \brief Inertia effect supported - uses axes acceleration.
@@ -238,7 +238,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_INERTIA (1<<9)
+#define SDL_HAPTIC_INERTIA (1u<<9)
/**
* \brief Friction effect supported - uses axes movement.
@@ -248,14 +248,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_FRICTION (1<<10)
+#define SDL_HAPTIC_FRICTION (1u<<10)
/**
* \brief Custom effect is supported.
*
* User defined custom haptic effect.
*/
-#define SDL_HAPTIC_CUSTOM (1<<11)
+#define SDL_HAPTIC_CUSTOM (1u<<11)
/* @} *//* Haptic effects */
@@ -268,7 +268,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticSetGain
*/
-#define SDL_HAPTIC_GAIN (1<<12)
+#define SDL_HAPTIC_GAIN (1u<<12)
/**
* \brief Device can set autocenter.
@@ -277,7 +277,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticSetAutocenter
*/
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
/**
* \brief Device can be queried for effect status.
@@ -286,7 +286,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticGetEffectStatus
*/
-#define SDL_HAPTIC_STATUS (1<<14)
+#define SDL_HAPTIC_STATUS (1u<<14)
/**
* \brief Device can be paused.
@@ -294,7 +294,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
* \sa SDL_HapticPause
* \sa SDL_HapticUnpause
*/
-#define SDL_HAPTIC_PAUSE (1<<15)
+#define SDL_HAPTIC_PAUSE (1u<<15)
/**
diff --git a/MP/code/SDL2/include/SDL_hints.h b/MP/code/SDL2/include/SDL_hints.h
index 3bd5435..dd15464 100644
--- a/MP/code/SDL2/include/SDL_hints.h
+++ b/MP/code/SDL2/include/SDL_hints.h
@@ -233,17 +233,28 @@ extern "C" {
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
-* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-* This variable can be set to the following values:
-* "0" - Relative mouse mode uses raw input
-* "1" - Relative mouse mode uses mouse warping
-*
-* By default SDL will use raw input for relative mouse mode
-*/
+ * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ * This variable can be set to the following values:
+ * "0" - Relative mouse mode uses raw input
+ * "1" - Relative mouse mode uses mouse warping
+ *
+ * By default SDL will use raw input for relative mouse mode
+ */
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
/**
+ * \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ * This variable can be set to the following values:
+ * "0" - Ignore mouse clicks that activate a window
+ * "1" - Generate events for mouse clicks that activate a window
+ *
+ * By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
+/**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
*
*/
@@ -257,8 +268,8 @@ extern "C" {
* this is problematic. This functionality can be disabled by setting this
* hint.
*
- * As of SDL 2.0.4, SDL_EnableScreenSaver and SDL_DisableScreenSaver accomplish
- * the same thing on iOS. They should be preferred over this hint.
+ * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
+ * accomplish the same thing on iOS. They should be preferred over this hint.
*
* This variable can be set to the following values:
* "0" - Enable idle timer
@@ -276,7 +287,35 @@ extern "C" {
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
*/
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-
+
+/**
+ * \brief A variable controlling whether controllers used with the Apple TV
+ * generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ * This variable can be set to the following values:
+ * "0" - Controller input does not generate UI events (the default).
+ * "1" - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief A variable controlling whether the Apple TV remote's joystick axes
+ * will automatically match the rotation of the remote.
+ *
+ * This variable can be set to the following values:
+ * "0" - Remote orientation does not affect joystick axes (the default).
+ * "1" - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
/**
* \brief A variable controlling whether the Android / iOS built-in
* accelerometer should be listed as a joystick device, rather than listing
@@ -369,7 +408,7 @@ extern "C" {
* Use this hint in case you need to set SDL's threads stack size to other than the default.
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
-* Support for this hint is currently available only in the pthread backend.
+* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*/
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
@@ -431,7 +470,7 @@ extern "C" {
* privacy policy.
*
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- * before calling any SDL_Init functions. The contents of the hint should
+ * before calling any SDL_Init() functions. The contents of the hint should
* be a valid URL. For example, "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy policy
@@ -461,7 +500,7 @@ extern "C" {
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy". This hint should only be set during app
- * initialization, preferably before any calls to SDL_Init.
+ * initialization, preferably before any calls to SDL_Init().
*
* For additional information on linking to a privacy policy, see the documentation for
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
@@ -631,6 +670,44 @@ extern "C" {
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
/**
+ * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ * "0" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file with an alpha mask. SDL will use the bitmap
+ * header version 4 and set the alpha mask accordingly.
+ * "1" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file without an alpha mask. The alpha channel data
+ * will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ * "0" - SDL will raise the 0x406D1388 Exception to name threads.
+ * This is the default behavior of SDL <= 2.0.4. (default)
+ * "1" - SDL will not raise this exception, and threads will be unnamed.
+ * For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
+
+/**
* \brief An enumeration of hint priorities
*/
typedef enum
@@ -670,6 +747,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
/**
+ * \brief Get a hint
+ *
+ * \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
+/**
* \brief Add a function to watch a particular hint
*
* \param name The hint to watch
diff --git a/MP/code/SDL2/include/SDL_joystick.h b/MP/code/SDL2/include/SDL_joystick.h
index 266f3b3..f5dbc94 100644
--- a/MP/code/SDL2/include/SDL_joystick.h
+++ b/MP/code/SDL2/include/SDL_joystick.h
@@ -24,7 +24,7 @@
*
* Include file for SDL joystick event handling
*
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
* behind a device_index changing as joysticks are plugged and unplugged.
*
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
diff --git a/MP/code/SDL2/include/SDL_keyboard.h b/MP/code/SDL2/include/SDL_keyboard.h
index bbba0f0..f80b6d2 100644
--- a/MP/code/SDL2/include/SDL_keyboard.h
+++ b/MP/code/SDL2/include/SDL_keyboard.h
@@ -136,7 +136,7 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
- * \sa SDL_Key
+ * \sa SDL_Keycode
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
diff --git a/MP/code/SDL2/include/SDL_main.h b/MP/code/SDL2/include/SDL_main.h
index 9ce3754..67afea5 100644
--- a/MP/code/SDL2/include/SDL_main.h
+++ b/MP/code/SDL2/include/SDL_main.h
@@ -63,7 +63,7 @@
/* On Android SDL provides a Java class in SDLActivity.java that is the
main activity entry point.
- See README-android.txt for more details on extending that class.
+ See README-android.md for more details on extending that class.
*/
#define SDL_MAIN_NEEDED
diff --git a/MP/code/SDL2/include/SDL_mouse.h b/MP/code/SDL2/include/SDL_mouse.h
index ea9622f..46f046d 100644
--- a/MP/code/SDL2/include/SDL_mouse.h
+++ b/MP/code/SDL2/include/SDL_mouse.h
@@ -41,7 +41,7 @@ extern "C" {
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
/**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
*/
typedef enum
{
@@ -254,9 +254,11 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
/**
- * \brief Frees a cursor created with SDL_CreateCursor().
+ * \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
*
* \sa SDL_CreateCursor()
+ * \sa SDL_CreateColorCursor()
+ * \sa SDL_CreateSystemCursor()
*/
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
diff --git a/MP/code/SDL2/include/SDL_opengles.h b/MP/code/SDL2/include/SDL_opengles.h
index bcc1277..15abee7 100644
--- a/MP/code/SDL2/include/SDL_opengles.h
+++ b/MP/code/SDL2/include/SDL_opengles.h
@@ -24,6 +24,7 @@
*
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
*/
+#include "SDL_config.h"
#ifdef __IPHONEOS__
#include <OpenGLES/ES1/gl.h>
diff --git a/MP/code/SDL2/include/SDL_opengles2.h b/MP/code/SDL2/include/SDL_opengles2.h
index edcd1a2..c961f0f 100644
--- a/MP/code/SDL2/include/SDL_opengles2.h
+++ b/MP/code/SDL2/include/SDL_opengles2.h
@@ -24,6 +24,8 @@
*
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
*/
+#include "SDL_config.h"
+
#ifndef _MSC_VER
#ifdef __IPHONEOS__
diff --git a/MP/code/SDL2/include/SDL_pixels.h b/MP/code/SDL2/include/SDL_pixels.h
index 8499c32..cf6a33f 100644
--- a/MP/code/SDL2/include/SDL_pixels.h
+++ b/MP/code/SDL2/include/SDL_pixels.h
@@ -29,6 +29,7 @@
#define _SDL_pixels_h
#include "SDL_stdinc.h"
+#include "SDL_endian.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -260,6 +261,19 @@ enum
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
+ /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
diff --git a/MP/code/SDL2/include/SDL_platform.h b/MP/code/SDL2/include/SDL_platform.h
index c6c2139..03cf170 100644
--- a/MP/code/SDL2/include/SDL_platform.h
+++ b/MP/code/SDL2/include/SDL_platform.h
@@ -70,18 +70,22 @@
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
#if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
#undef __IPHONEOS__
#define __IPHONEOS__ 1
#undef __MACOSX__
#else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
#undef __MACOSX__
#define __MACOSX__ 1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
-# error SDL for Mac OS X only supports deploying on 10.5 and above.
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
#endif /* TARGET_OS_IPHONE */
#endif /* defined(__APPLE__) */
diff --git a/MP/code/SDL2/include/SDL_render.h b/MP/code/SDL2/include/SDL_render.h
index e4ed2af..60c87b6 100644
--- a/MP/code/SDL2/include/SDL_render.h
+++ b/MP/code/SDL2/include/SDL_render.h
@@ -500,6 +500,30 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
/**
+ * \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ * \param renderer The renderer for which integer scaling should be set.
+ * \param enable Enable or disable integer scaling
+ *
+ * This function restricts the logical viewport to integer values - that is, when
+ * a resolution is between two multiples of a logical size, the viewport size is
+ * rounded down to the lower multiple.
+ *
+ * \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+ SDL_bool enable);
+
+/**
+ * \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ * \param renderer The renderer from which integer scaling should be queried.
+ *
+ * \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
+/**
* \brief Set the drawing area for rendering on the current target.
*
* \param renderer The renderer for which the drawing area should be set.
@@ -658,7 +682,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
/**
* \brief Clear the current rendering target with the drawing color
*
- * This function clears the entire rendering target, ignoring the viewport.
+ * This function clears the entire rendering target, ignoring the viewport and
+ * the clip rectangle.
*
* \return 0 on success, or -1 on error
*/
diff --git a/MP/code/SDL2/include/SDL_revision.h b/MP/code/SDL2/include/SDL_revision.h
index 6d7163d..341dc5c 100644
--- a/MP/code/SDL2/include/SDL_revision.h
+++ b/MP/code/SDL2/include/SDL_revision.h
@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
diff --git a/MP/code/SDL2/include/SDL_rwops.h b/MP/code/SDL2/include/SDL_rwops.h
index f460ae7..1ad3ac4 100644
--- a/MP/code/SDL2/include/SDL_rwops.h
+++ b/MP/code/SDL2/include/SDL_rwops.h
@@ -39,12 +39,12 @@ extern "C" {
#endif
/* RWops Types */
-#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
-#define SDL_RWOPS_WINFILE 1 /* Win32 file */
-#define SDL_RWOPS_STDFILE 2 /* Stdio file */
-#define SDL_RWOPS_JNIFILE 3 /* Android asset */
-#define SDL_RWOPS_MEMORY 4 /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN 0U /* Unknown stream type */
+#define SDL_RWOPS_WINFILE 1U /* Win32 file */
+#define SDL_RWOPS_STDFILE 2U /* Stdio file */
+#define SDL_RWOPS_JNIFILE 3U /* Android asset */
+#define SDL_RWOPS_MEMORY 4U /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U /* Read-Only memory stream */
/**
* This is the read/write operation structure -- very basic.
diff --git a/MP/code/SDL2/include/SDL_stdinc.h b/MP/code/SDL2/include/SDL_stdinc.h
index 887bcd2..fdf9641 100644
--- a/MP/code/SDL2/include/SDL_stdinc.h
+++ b/MP/code/SDL2/include/SDL_stdinc.h
@@ -83,9 +83,6 @@
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
/**
* The number of elements in an array.
@@ -94,6 +91,13 @@
#define SDL_TABLESIZE(table) SDL_arraysize(table)
/**
+ * Macro useful for building other macros with strings in them
+ *
+ * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg) #arg
+
+/**
* \name Cast operators
*
* Use proper C++ casts when compiled as C++ to be compatible with the option
diff --git a/MP/code/SDL2/include/SDL_surface.h b/MP/code/SDL2/include/SDL_surface.h
index e63ca89..e4a06a2 100644
--- a/MP/code/SDL2/include/SDL_surface.h
+++ b/MP/code/SDL2/include/SDL_surface.h
@@ -118,6 +118,8 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
(Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+ (Uint32 flags, int width, int height, int depth, Uint32 format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
int width,
int height,
@@ -127,6 +129,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+ (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
/**
@@ -184,6 +188,12 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
/**
* Save a surface to a seekable SDL data stream (memory or file).
*
+ * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ * BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ * not supported.
+ *
* If \c freedst is non-zero, the stream will be closed after being written.
*
* \return 0 if successful or -1 if there was an error.
diff --git a/MP/code/SDL2/include/SDL_syswm.h b/MP/code/SDL2/include/SDL_syswm.h
index 1056e52..71ba5f1 100644
--- a/MP/code/SDL2/include/SDL_syswm.h
+++ b/MP/code/SDL2/include/SDL_syswm.h
@@ -106,6 +106,10 @@ typedef struct ANativeWindow ANativeWindow;
typedef void *EGLSurface;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
/**
* These are the various supported windowing subsystems
*/
@@ -120,7 +124,8 @@ typedef enum
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT,
- SDL_SYSWM_ANDROID
+ SDL_SYSWM_ANDROID,
+ SDL_SYSWM_VIVANTE
} SDL_SYSWM_TYPE;
/**
@@ -167,6 +172,13 @@ struct SDL_SysWMmsg
/* No UIKit window events yet */
} uikit;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ int dummy;
+ /* No Vivante window events yet */
+ } vivante;
+#endif
/* Can't have an empty union */
int dummy;
} msg;
@@ -259,6 +271,14 @@ struct SDL_SysWMinfo
} android;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ EGLNativeDisplayType display;
+ EGLNativeWindowType window;
+ } vivante;
+#endif
+
/* Can't have an empty union */
int dummy;
} info;
diff --git a/MP/code/SDL2/include/SDL_version.h b/MP/code/SDL2/include/SDL_version.h
index de1f160..1700efd 100644
--- a/MP/code/SDL2/include/SDL_version.h
+++ b/MP/code/SDL2/include/SDL_version.h
@@ -59,7 +59,7 @@ typedef struct SDL_version
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 4
+#define SDL_PATCHLEVEL 5
/**
* \brief Macro to determine SDL version program was compiled against.
diff --git a/MP/code/SDL2/include/SDL_video.h b/MP/code/SDL2/include/SDL_video.h
index 52dbbc7..73c33eb 100644
--- a/MP/code/SDL2/include/SDL_video.h
+++ b/MP/code/SDL2/include/SDL_video.h
@@ -83,6 +83,7 @@ typedef struct
* \sa SDL_SetWindowPosition()
* \sa SDL_SetWindowSize()
* \sa SDL_SetWindowBordered()
+ * \sa SDL_SetWindowResizable()
* \sa SDL_SetWindowTitle()
* \sa SDL_ShowWindow()
*/
@@ -95,6 +96,7 @@ typedef struct SDL_Window SDL_Window;
*/
typedef enum
{
+ /* !!! FIXME: change this to name = (1<<x). */
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
@@ -109,13 +111,18 @@ typedef enum
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported */
- SDL_WINDOW_MOUSE_CAPTURE = 0x00004000 /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
+ SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
+ SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
+ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
+ SDL_WINDOW_POPUP_MENU = 0x00080000 /**< window should be treated as a popup menu */
} SDL_WindowFlags;
/**
* \brief Used to indicate that you don't care what the window position is.
*/
-#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
@@ -124,7 +131,7 @@ typedef enum
/**
* \brief Used to indicate that the window position should be centered.
*/
-#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
@@ -154,8 +161,9 @@ typedef enum
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
- SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
- window be closed */
+ SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
+ SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+ SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
} SDL_WindowEventID;
/**
@@ -311,6 +319,25 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * re
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
/**
+ * \brief Get the usable desktop area represented by a display, with the
+ * primary display located at 0,0
+ *
+ * This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ * reserved by the system removed. For example, on Mac OS X, this subtracts
+ * the area occupied by the menu bar and dock.
+ *
+ * Setting a window to be fullscreen generally bypasses these unusable areas,
+ * so these are good guidelines for the maximum space available to a
+ * non-fullscreen window.
+ *
+ * \return 0 on success, or -1 if the index is out of range.
+ *
+ * \sa SDL_GetDisplayBounds()
+ * \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
+/**
* \brief Returns the number of available display modes.
*
* \sa SDL_GetDisplayMode()
@@ -423,7 +450,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
* ::SDL_WINDOW_ALLOW_HIGHDPI.
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
* in pixels may differ from its size in screen coordinates on platforms with
@@ -442,7 +469,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
*
* \param data A pointer to driver-dependent window creation data
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* \sa SDL_DestroyWindow()
*/
@@ -587,6 +614,25 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
int *h);
/**
+ * \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ * \param window The window to query.
+ * \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ * \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ * \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ * \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ * \return 0 on success, or -1 if getting this information is not supported.
+ *
+ * \note if this function fails (returns -1), the size values will be
+ * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ * if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+ int *top, int *left,
+ int *bottom, int *right);
+
+/**
* \brief Set the minimum size of a window's client area.
*
* \param window The window to set a new minimum size.
@@ -662,6 +708,23 @@ extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
SDL_bool bordered);
/**
+ * \brief Set the user-resizable state of a window.
+ *
+ * This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ * allow/disallow user resizing of the window. This is a no-op if the
+ * window's resizable state already matches the requested state.
+ *
+ * \param window The window of which to change the resizable state.
+ * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ * \note You can't change the resizable state of a fullscreen window.
+ *
+ * \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+ SDL_bool resizable);
+
+/**
* \brief Show a window.
*
* \sa SDL_HideWindow()
@@ -744,7 +807,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
* \return 0 on success, or -1 on error.
*
* \sa SDL_GetWindowSurface()
- * \sa SDL_UpdateWindowSurfaceRect()
+ * \sa SDL_UpdateWindowSurface()
*/
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
const SDL_Rect * rects,
@@ -802,6 +865,58 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
/**
+ * \brief Set the opacity for a window
+ *
+ * \param window The window which will be made transparent or opaque
+ * \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ * clamped internally between 0.0f and 1.0f.
+ *
+ * \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ * \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ * \brief Get the opacity of a window.
+ *
+ * If transparency isn't supported on this platform, opacity will be reported
+ * as 1.0f without error.
+ *
+ * \param window The window in question.
+ * \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ * \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ * \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ * \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ * \param modal_window The window that should be modal
+ * \param parent_window The parent window
+ *
+ * \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ * \brief Explicitly sets input focus to the window.
+ *
+ * You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ * this with caution, as you might give focus to a window that's completely
+ * obscured by other windows.
+ *
+ * \param window The window that should get the input focus
+ *
+ * \return 0 on success, or -1 otherwise.
+ * \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
+/**
* \brief Set the gamma ramp for a window.
*
* \param window The window for which the gamma ramp should be set.
@@ -920,7 +1035,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
/**
- * \brief Returns whether the screensaver is currently enabled (default on).
+ * \brief Returns whether the screensaver is currently enabled (default off).
*
* \sa SDL_EnableScreenSaver()
* \sa SDL_DisableScreenSaver()
diff --git a/MP/code/libs/linux32/libSDL2-2.0.so.0.4.0 b/MP/code/libs/linux32/libSDL2-2.0.so.0.4.0
deleted file mode 100755
index d6f458d..0000000
Binary files a/MP/code/libs/linux32/libSDL2-2.0.so.0.4.0 and /dev/null differ
diff --git a/MP/code/libs/linux32/libSDL2-2.0.so.0.4.1 b/MP/code/libs/linux32/libSDL2-2.0.so.0.4.1
new file mode 100755
index 0000000..4b939e8
Binary files /dev/null and b/MP/code/libs/linux32/libSDL2-2.0.so.0.4.1 differ
diff --git a/MP/code/libs/linux32/libSDL2main.a b/MP/code/libs/linux32/libSDL2main.a
index 2e1be34..90b2903 100644
Binary files a/MP/code/libs/linux32/libSDL2main.a and b/MP/code/libs/linux32/libSDL2main.a differ
diff --git a/SP/code/libs/linux64/libSDL2-2.0.so.0.4.0 b/MP/code/libs/linux64/libSDL2-2.0.so.0.4.1
similarity index 51%
rename from SP/code/libs/linux64/libSDL2-2.0.so.0.4.0
rename to MP/code/libs/linux64/libSDL2-2.0.so.0.4.1
index 359a3f2..06fcb78 100755
Binary files a/SP/code/libs/linux64/libSDL2-2.0.so.0.4.0 and b/MP/code/libs/linux64/libSDL2-2.0.so.0.4.1 differ
diff --git a/MP/code/libs/linux64/libSDL2main.a b/MP/code/libs/linux64/libSDL2main.a
index df6a430..b0fd4bd 100644
Binary files a/MP/code/libs/linux64/libSDL2main.a and b/MP/code/libs/linux64/libSDL2main.a differ
diff --git a/MP/code/libs/macosx/libSDL2-2.0.0.dylib b/MP/code/libs/macosx/libSDL2-2.0.0.dylib
index a14c323..85a4d39 100755
Binary files a/MP/code/libs/macosx/libSDL2-2.0.0.dylib and b/MP/code/libs/macosx/libSDL2-2.0.0.dylib differ
diff --git a/MP/code/libs/macosx/libSDL2main.a b/MP/code/libs/macosx/libSDL2main.a
index 4364d15..f25dfbe 100644
Binary files a/MP/code/libs/macosx/libSDL2main.a and b/MP/code/libs/macosx/libSDL2main.a differ
diff --git a/MP/code/libs/win32/SDL2.dll b/MP/code/libs/win32/SDL2.dll
index 10cca80..2b7e319 100755
Binary files a/MP/code/libs/win32/SDL2.dll and b/MP/code/libs/win32/SDL2.dll differ
diff --git a/MP/code/libs/win32/libSDL2.dll.a b/MP/code/libs/win32/libSDL2.dll.a
index e5d5a94..26f9686 100644
Binary files a/MP/code/libs/win32/libSDL2.dll.a and b/MP/code/libs/win32/libSDL2.dll.a differ
diff --git a/MP/code/libs/win32/libSDL2main.a b/MP/code/libs/win32/libSDL2main.a
index 6e9ce3d..4cf4727 100644
Binary files a/MP/code/libs/win32/libSDL2main.a and b/MP/code/libs/win32/libSDL2main.a differ
diff --git a/MP/code/libs/win64/SDL264.dll b/MP/code/libs/win64/SDL264.dll
index 61c5bac..8e0c64c 100755
Binary files a/MP/code/libs/win64/SDL264.dll and b/MP/code/libs/win64/SDL264.dll differ
diff --git a/MP/code/libs/win64/libSDL264.dll.a b/MP/code/libs/win64/libSDL264.dll.a
index 4d866e7..c544d65 100644
Binary files a/MP/code/libs/win64/libSDL264.dll.a and b/MP/code/libs/win64/libSDL264.dll.a differ
diff --git a/MP/code/libs/win64/libSDL264main.a b/MP/code/libs/win64/libSDL264main.a
index d5b6a26..38a02de 100644
Binary files a/MP/code/libs/win64/libSDL264main.a and b/MP/code/libs/win64/libSDL264main.a differ
diff --git a/SP/Makefile b/SP/Makefile
index ce0f915..fd0a9eb 100644
--- a/SP/Makefile
+++ b/SP/Makefile
@@ -416,11 +416,11 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")
ifeq ($(CROSS_COMPILING),1)
ifeq ($(ARCH),x86)
SDL_LIBS = $(LIBSDIR)/linux32/libSDL2main.a \
- $(LIBSDIR)/linux32/libSDL2-2.0.so.0.4.0
+ $(LIBSDIR)/linux32/libSDL2-2.0.so.0.4.1
endif
ifeq ($(ARCH),x86_64)
SDL_LIBS = $(LIBSDIR)/linux64/libSDL2main.a \
- $(LIBSDIR)/linux64/libSDL2-2.0.so.0.4.0
+ $(LIBSDIR)/linux64/libSDL2-2.0.so.0.4.1
endif
endif
endif
diff --git a/SP/code/SDL2/include/SDL.h b/SP/code/SDL2/include/SDL.h
index 7647b51..1a3fa28 100644
--- a/SP/code/SDL2/include/SDL.h
+++ b/SP/code/SDL2/include/SDL.h
@@ -72,14 +72,14 @@ extern "C" {
* specify the subsystems which you will be using in your application.
*/
/* @{ */
-#define SDL_INIT_TIMER 0x00000001
-#define SDL_INIT_AUDIO 0x00000010
-#define SDL_INIT_VIDEO 0x00000020 /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
-#define SDL_INIT_JOYSTICK 0x00000200 /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
-#define SDL_INIT_HAPTIC 0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS 0x00004000
-#define SDL_INIT_NOPARACHUTE 0x00100000 /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER 0x00000001u
+#define SDL_INIT_AUDIO 0x00000010u
+#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC 0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS 0x00004000u
+#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
@@ -95,8 +95,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
* This function initializes specific SDL subsystems
*
* Subsystem initialization is ref-counted, you must call
- * SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
- * shutdown a subsystem manually (or call SDL_Quit to force shutdown).
+ * SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
+ * shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
* If a subsystem is already loaded then this call will
* increase the ref-count and return.
*/
diff --git a/SP/code/SDL2/include/SDL_audio.h b/SP/code/SDL2/include/SDL_audio.h
index 4f65521..d51f0d1 100644
--- a/SP/code/SDL2/include/SDL_audio.h
+++ b/SP/code/SDL2/include/SDL_audio.h
@@ -278,7 +278,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
* protect data structures that it accesses by calling SDL_LockAudio()
* and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL
* pointer here, and call SDL_QueueAudio() with some frequency, to queue
- * more audio samples to be played.
+ * more audio samples to be played (or for capture devices, call
+ * SDL_DequeueAudio() with some frequency, to obtain audio samples).
* - \c desired->userdata is passed as the first parameter to your callback
* function. If you passed a NULL callback, this value is ignored.
*
@@ -482,6 +483,10 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
/**
* Queue more audio on non-callback devices.
*
+ * (If you are looking to retrieve queued audio from a non-callback capture
+ * device, you want SDL_DequeueAudio() instead. This will return -1 to
+ * signify an error if you use it with capture devices.)
+ *
* SDL offers two ways to feed audio to the device: you can either supply a
* callback that SDL triggers with some frequency to obtain more audio
* (pull method), or you can supply no callback, and then SDL will expect
@@ -517,20 +522,75 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
/**
+ * Dequeue more audio on non-callback devices.
+ *
+ * (If you are looking to queue audio for output on a non-callback playback
+ * device, you want SDL_QueueAudio() instead. This will always return 0
+ * if you use it with playback devices.)
+ *
+ * SDL offers two ways to retrieve audio from a capture device: you can
+ * either supply a callback that SDL triggers with some frequency as the
+ * device records more audio data, (push method), or you can supply no
+ * callback, and then SDL will expect you to retrieve data at regular
+ * intervals (pull method) with this function.
+ *
+ * There are no limits on the amount of data you can queue, short of
+ * exhaustion of address space. Data from the device will keep queuing as
+ * necessary without further intervention from you. This means you will
+ * eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ * Capture devices will not queue data when paused; if you are expecting
+ * to not need captured audio for some length of time, use
+ * SDL_PauseAudioDevice() to stop the capture device from queueing more
+ * data. This can be useful during, say, level loading times. When
+ * unpaused, capture devices will start queueing data from that point,
+ * having flushed any capturable data available while paused.
+ *
+ * This function is thread-safe, but dequeueing from the same device from
+ * two threads at once does not promise which thread will dequeued data
+ * first.
+ *
+ * You may not dequeue audio from a device that is using an
+ * application-supplied callback; doing so returns an error. You have to use
+ * the audio callback, or dequeue audio with this function, but not both.
+ *
+ * You should not call SDL_LockAudio() on the device before queueing; SDL
+ * handles locking internally for this function.
+ *
+ * \param dev The device ID from which we will dequeue audio.
+ * \param data A pointer into where audio data should be copied.
+ * \param len The number of bytes (not samples!) to which (data) points.
+ * \return number of bytes dequeued, which could be less than requested.
+ *
+ * \sa SDL_GetQueuedAudioSize
+ * \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
+
+/**
* Get the number of bytes of still-queued audio.
*
- * This is the number of bytes that have been queued for playback with
- * SDL_QueueAudio(), but have not yet been sent to the hardware.
+ * For playback device:
+ *
+ * This is the number of bytes that have been queued for playback with
+ * SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ * number may shrink at any time, so this only informs of pending data.
+ *
+ * Once we've sent it to the hardware, this function can not decide the
+ * exact byte boundary of what has been played. It's possible that we just
+ * gave the hardware several kilobytes right before you called this
+ * function, but it hasn't played any of it yet, or maybe half of it, etc.
+ *
+ * For capture devices:
*
- * Once we've sent it to the hardware, this function can not decide the exact
- * byte boundary of what has been played. It's possible that we just gave the
- * hardware several kilobytes right before you called this function, but it
- * hasn't played any of it yet, or maybe half of it, etc.
+ * This is the number of bytes that have been captured by the device and
+ * are waiting for you to dequeue. This number may grow at any time, so
+ * this only informs of the lower-bound of available data.
*
* You may not queue audio on a device that is using an application-supplied
* callback; calling this function on such a device always returns 0.
- * You have to use the audio callback or queue audio with SDL_QueueAudio(),
- * but not both.
+ * You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before querying; SDL
* handles locking internally for this function.
@@ -544,10 +604,17 @@ extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *da
extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
/**
- * Drop any queued audio data waiting to be sent to the hardware.
+ * Drop any queued audio data. For playback devices, this is any queued data
+ * still waiting to be submitted to the hardware. For capture devices, this
+ * is any data that was queued by the device that hasn't yet been dequeued by
+ * the application.
*
- * Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- * the hardware will start playing silence if more audio isn't queued.
+ * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ * playback devices, the hardware will start playing silence if more audio
+ * isn't queued. Unpaused capture devices will start filling the queue again
+ * as soon as they have more data available (which, depending on the state
+ * of the hardware and the thread, could be before this function call
+ * returns!).
*
* This will not prevent playback of queued audio that's already been sent
* to the hardware, as we can not undo that, so expect there to be some
@@ -557,8 +624,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
*
* You may not queue audio on a device that is using an application-supplied
* callback; calling this function on such a device is always a no-op.
- * You have to use the audio callback or queue audio with SDL_QueueAudio(),
- * but not both.
+ * You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before clearing the
* queue; SDL handles locking internally for this function.
diff --git a/SP/code/SDL2/include/SDL_config.h.cmake b/SP/code/SDL2/include/SDL_config.h.cmake
index 44173a0..98c62a9 100644
--- a/SP/code/SDL2/include/SDL_config.h.cmake
+++ b/SP/code/SDL2/include/SDL_config.h.cmake
@@ -81,6 +81,8 @@
#cmakedefine HAVE_PTHREAD_NP_H 1
#cmakedefine HAVE_LIBUDEV_H 1
#cmakedefine HAVE_DBUS_DBUS_H 1
+#cmakedefine HAVE_IBUS_IBUS_H 1
+#cmakedefine HAVE_FCITX_FRONTEND_H 1
/* C library functions */
#cmakedefine HAVE_MALLOC 1
diff --git a/SP/code/SDL2/include/SDL_config.h.in b/SP/code/SDL2/include/SDL_config.h.in
index 2071be4..d610cd6 100644
--- a/SP/code/SDL2/include/SDL_config.h.in
+++ b/SP/code/SDL2/include/SDL_config.h.in
@@ -82,6 +82,7 @@
#undef HAVE_LIBUDEV_H
#undef HAVE_DBUS_DBUS_H
#undef HAVE_IBUS_IBUS_H
+#undef HAVE_FCITX_FRONTEND_H
/* C library functions */
#undef HAVE_MALLOC
@@ -356,4 +357,7 @@
#undef SDL_ASSEMBLY_ROUTINES
#undef SDL_ALTIVEC_BLITTERS
+/* Enable ime support */
+#undef SDL_USE_IME
+
#endif /* _SDL_config_h */
diff --git a/SP/code/SDL2/include/SDL_config_android.h b/SP/code/SDL2/include/SDL_config_android.h
index a388ba8..996cf76 100644
--- a/SP/code/SDL2/include/SDL_config_android.h
+++ b/SP/code/SDL2/include/SDL_config_android.h
@@ -43,6 +43,7 @@
#define HAVE_STDINT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
/* C library functions */
#define HAVE_MALLOC 1
@@ -75,6 +76,7 @@
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
+#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRCASECMP 1
@@ -101,6 +103,7 @@
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
+#define HAVE_SIGACTION 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
#define HAVE_SYSCONF 1
diff --git a/SP/code/SDL2/include/SDL_config_iphoneos.h b/SP/code/SDL2/include/SDL_config_iphoneos.h
index 304c892..470985f 100644
--- a/SP/code/SDL2/include/SDL_config_iphoneos.h
+++ b/SP/code/SDL2/include/SDL_config_iphoneos.h
@@ -119,11 +119,7 @@
#define SDL_JOYSTICK_MFI 1
/* Enable Unix style SO loading */
-/* Technically this works, but violates the iOS dev agreement prior to iOS 8 */
-/* #define SDL_LOADSO_DLOPEN 1 */
-
-/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
-#define SDL_LOADSO_DISABLED 1
+#define SDL_LOADSO_DLOPEN 1
/* Enable various threading systems */
#define SDL_THREAD_PTHREAD 1
diff --git a/SP/code/SDL2/include/SDL_events.h b/SP/code/SDL2/include/SDL_events.h
index 1437f4c..edb89ef 100644
--- a/SP/code/SDL2/include/SDL_events.h
+++ b/SP/code/SDL2/include/SDL_events.h
@@ -136,6 +136,9 @@ typedef enum
/* Drag and drop events */
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
+ SDL_DROPTEXT, /**< text/plain drag-and-drop event */
+ SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
+ SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
/* Audio hotplug events */
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
@@ -461,9 +464,10 @@ typedef struct SDL_DollarGestureEvent
*/
typedef struct SDL_DropEvent
{
- Uint32 type; /**< ::SDL_DROPFILE */
+ Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
Uint32 timestamp;
- char *file; /**< The file name, which should be freed with SDL_free() */
+ char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+ Uint32 windowID; /**< The window that was dropped on, if any */
} SDL_DropEvent;
diff --git a/SP/code/SDL2/include/SDL_gamecontroller.h b/SP/code/SDL2/include/SDL_gamecontroller.h
index 42087ee..e67fd9f 100644
--- a/SP/code/SDL2/include/SDL_gamecontroller.h
+++ b/SP/code/SDL2/include/SDL_gamecontroller.h
@@ -93,7 +93,7 @@ typedef struct SDL_GameControllerButtonBind
* }
* }
*
- * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
*
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
@@ -136,14 +136,14 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingStr
/**
* Get a mapping string for a GUID
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
/**
* Get a mapping string for an open GameController
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
diff --git a/SP/code/SDL2/include/SDL_haptic.h b/SP/code/SDL2/include/SDL_haptic.h
index b36d78b..9421c8f 100644
--- a/SP/code/SDL2/include/SDL_haptic.h
+++ b/SP/code/SDL2/include/SDL_haptic.h
@@ -149,7 +149,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_CONSTANT (1<<0)
+#define SDL_HAPTIC_CONSTANT (1u<<0)
/**
* \brief Sine wave effect supported.
@@ -158,7 +158,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SINE (1<<1)
+#define SDL_HAPTIC_SINE (1u<<1)
/**
* \brief Left/Right effect supported.
@@ -169,7 +169,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
* \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
* we ran out of bits, and this is important for XInput devices.
*/
-#define SDL_HAPTIC_LEFTRIGHT (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT (1u<<2)
/* !!! FIXME: put this back when we have more bits in 2.1 */
/* #define SDL_HAPTIC_SQUARE (1<<2) */
@@ -181,7 +181,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_TRIANGLE (1<<3)
+#define SDL_HAPTIC_TRIANGLE (1u<<3)
/**
* \brief Sawtoothup wave effect supported.
@@ -190,7 +190,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
/**
* \brief Sawtoothdown wave effect supported.
@@ -199,7 +199,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
/**
* \brief Ramp effect supported.
@@ -208,7 +208,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticRamp
*/
-#define SDL_HAPTIC_RAMP (1<<6)
+#define SDL_HAPTIC_RAMP (1u<<6)
/**
* \brief Spring effect supported - uses axes position.
@@ -218,7 +218,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_SPRING (1<<7)
+#define SDL_HAPTIC_SPRING (1u<<7)
/**
* \brief Damper effect supported - uses axes velocity.
@@ -228,7 +228,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_DAMPER (1<<8)
+#define SDL_HAPTIC_DAMPER (1u<<8)
/**
* \brief Inertia effect supported - uses axes acceleration.
@@ -238,7 +238,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_INERTIA (1<<9)
+#define SDL_HAPTIC_INERTIA (1u<<9)
/**
* \brief Friction effect supported - uses axes movement.
@@ -248,14 +248,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_FRICTION (1<<10)
+#define SDL_HAPTIC_FRICTION (1u<<10)
/**
* \brief Custom effect is supported.
*
* User defined custom haptic effect.
*/
-#define SDL_HAPTIC_CUSTOM (1<<11)
+#define SDL_HAPTIC_CUSTOM (1u<<11)
/* @} *//* Haptic effects */
@@ -268,7 +268,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticSetGain
*/
-#define SDL_HAPTIC_GAIN (1<<12)
+#define SDL_HAPTIC_GAIN (1u<<12)
/**
* \brief Device can set autocenter.
@@ -277,7 +277,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticSetAutocenter
*/
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
/**
* \brief Device can be queried for effect status.
@@ -286,7 +286,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
*
* \sa SDL_HapticGetEffectStatus
*/
-#define SDL_HAPTIC_STATUS (1<<14)
+#define SDL_HAPTIC_STATUS (1u<<14)
/**
* \brief Device can be paused.
@@ -294,7 +294,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
* \sa SDL_HapticPause
* \sa SDL_HapticUnpause
*/
-#define SDL_HAPTIC_PAUSE (1<<15)
+#define SDL_HAPTIC_PAUSE (1u<<15)
/**
diff --git a/SP/code/SDL2/include/SDL_hints.h b/SP/code/SDL2/include/SDL_hints.h
index 3bd5435..dd15464 100644
--- a/SP/code/SDL2/include/SDL_hints.h
+++ b/SP/code/SDL2/include/SDL_hints.h
@@ -233,17 +233,28 @@ extern "C" {
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
-* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-* This variable can be set to the following values:
-* "0" - Relative mouse mode uses raw input
-* "1" - Relative mouse mode uses mouse warping
-*
-* By default SDL will use raw input for relative mouse mode
-*/
+ * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ * This variable can be set to the following values:
+ * "0" - Relative mouse mode uses raw input
+ * "1" - Relative mouse mode uses mouse warping
+ *
+ * By default SDL will use raw input for relative mouse mode
+ */
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
/**
+ * \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ * This variable can be set to the following values:
+ * "0" - Ignore mouse clicks that activate a window
+ * "1" - Generate events for mouse clicks that activate a window
+ *
+ * By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
+/**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
*
*/
@@ -257,8 +268,8 @@ extern "C" {
* this is problematic. This functionality can be disabled by setting this
* hint.
*
- * As of SDL 2.0.4, SDL_EnableScreenSaver and SDL_DisableScreenSaver accomplish
- * the same thing on iOS. They should be preferred over this hint.
+ * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
+ * accomplish the same thing on iOS. They should be preferred over this hint.
*
* This variable can be set to the following values:
* "0" - Enable idle timer
@@ -276,7 +287,35 @@ extern "C" {
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
*/
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-
+
+/**
+ * \brief A variable controlling whether controllers used with the Apple TV
+ * generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ * This variable can be set to the following values:
+ * "0" - Controller input does not generate UI events (the default).
+ * "1" - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief A variable controlling whether the Apple TV remote's joystick axes
+ * will automatically match the rotation of the remote.
+ *
+ * This variable can be set to the following values:
+ * "0" - Remote orientation does not affect joystick axes (the default).
+ * "1" - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
/**
* \brief A variable controlling whether the Android / iOS built-in
* accelerometer should be listed as a joystick device, rather than listing
@@ -369,7 +408,7 @@ extern "C" {
* Use this hint in case you need to set SDL's threads stack size to other than the default.
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
-* Support for this hint is currently available only in the pthread backend.
+* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*/
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
@@ -431,7 +470,7 @@ extern "C" {
* privacy policy.
*
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- * before calling any SDL_Init functions. The contents of the hint should
+ * before calling any SDL_Init() functions. The contents of the hint should
* be a valid URL. For example, "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy policy
@@ -461,7 +500,7 @@ extern "C" {
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy". This hint should only be set during app
- * initialization, preferably before any calls to SDL_Init.
+ * initialization, preferably before any calls to SDL_Init().
*
* For additional information on linking to a privacy policy, see the documentation for
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
@@ -631,6 +670,44 @@ extern "C" {
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
/**
+ * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ * "0" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file with an alpha mask. SDL will use the bitmap
+ * header version 4 and set the alpha mask accordingly.
+ * "1" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file without an alpha mask. The alpha channel data
+ * will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ * "0" - SDL will raise the 0x406D1388 Exception to name threads.
+ * This is the default behavior of SDL <= 2.0.4. (default)
+ * "1" - SDL will not raise this exception, and threads will be unnamed.
+ * For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
+
+/**
* \brief An enumeration of hint priorities
*/
typedef enum
@@ -670,6 +747,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
/**
+ * \brief Get a hint
+ *
+ * \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
+/**
* \brief Add a function to watch a particular hint
*
* \param name The hint to watch
diff --git a/SP/code/SDL2/include/SDL_joystick.h b/SP/code/SDL2/include/SDL_joystick.h
index 266f3b3..f5dbc94 100644
--- a/SP/code/SDL2/include/SDL_joystick.h
+++ b/SP/code/SDL2/include/SDL_joystick.h
@@ -24,7 +24,7 @@
*
* Include file for SDL joystick event handling
*
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
* behind a device_index changing as joysticks are plugged and unplugged.
*
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
diff --git a/SP/code/SDL2/include/SDL_keyboard.h b/SP/code/SDL2/include/SDL_keyboard.h
index bbba0f0..f80b6d2 100644
--- a/SP/code/SDL2/include/SDL_keyboard.h
+++ b/SP/code/SDL2/include/SDL_keyboard.h
@@ -136,7 +136,7 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
- * \sa SDL_Key
+ * \sa SDL_Keycode
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
diff --git a/SP/code/SDL2/include/SDL_main.h b/SP/code/SDL2/include/SDL_main.h
index 9ce3754..67afea5 100644
--- a/SP/code/SDL2/include/SDL_main.h
+++ b/SP/code/SDL2/include/SDL_main.h
@@ -63,7 +63,7 @@
/* On Android SDL provides a Java class in SDLActivity.java that is the
main activity entry point.
- See README-android.txt for more details on extending that class.
+ See README-android.md for more details on extending that class.
*/
#define SDL_MAIN_NEEDED
diff --git a/SP/code/SDL2/include/SDL_mouse.h b/SP/code/SDL2/include/SDL_mouse.h
index ea9622f..46f046d 100644
--- a/SP/code/SDL2/include/SDL_mouse.h
+++ b/SP/code/SDL2/include/SDL_mouse.h
@@ -41,7 +41,7 @@ extern "C" {
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
/**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
*/
typedef enum
{
@@ -254,9 +254,11 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
/**
- * \brief Frees a cursor created with SDL_CreateCursor().
+ * \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
*
* \sa SDL_CreateCursor()
+ * \sa SDL_CreateColorCursor()
+ * \sa SDL_CreateSystemCursor()
*/
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
diff --git a/SP/code/SDL2/include/SDL_opengles.h b/SP/code/SDL2/include/SDL_opengles.h
index bcc1277..15abee7 100644
--- a/SP/code/SDL2/include/SDL_opengles.h
+++ b/SP/code/SDL2/include/SDL_opengles.h
@@ -24,6 +24,7 @@
*
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
*/
+#include "SDL_config.h"
#ifdef __IPHONEOS__
#include <OpenGLES/ES1/gl.h>
diff --git a/SP/code/SDL2/include/SDL_opengles2.h b/SP/code/SDL2/include/SDL_opengles2.h
index edcd1a2..c961f0f 100644
--- a/SP/code/SDL2/include/SDL_opengles2.h
+++ b/SP/code/SDL2/include/SDL_opengles2.h
@@ -24,6 +24,8 @@
*
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
*/
+#include "SDL_config.h"
+
#ifndef _MSC_VER
#ifdef __IPHONEOS__
diff --git a/SP/code/SDL2/include/SDL_pixels.h b/SP/code/SDL2/include/SDL_pixels.h
index 8499c32..cf6a33f 100644
--- a/SP/code/SDL2/include/SDL_pixels.h
+++ b/SP/code/SDL2/include/SDL_pixels.h
@@ -29,6 +29,7 @@
#define _SDL_pixels_h
#include "SDL_stdinc.h"
+#include "SDL_endian.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -260,6 +261,19 @@ enum
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
+ /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
diff --git a/SP/code/SDL2/include/SDL_platform.h b/SP/code/SDL2/include/SDL_platform.h
index c6c2139..03cf170 100644
--- a/SP/code/SDL2/include/SDL_platform.h
+++ b/SP/code/SDL2/include/SDL_platform.h
@@ -70,18 +70,22 @@
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
#if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
#undef __IPHONEOS__
#define __IPHONEOS__ 1
#undef __MACOSX__
#else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
#undef __MACOSX__
#define __MACOSX__ 1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
-# error SDL for Mac OS X only supports deploying on 10.5 and above.
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
#endif /* TARGET_OS_IPHONE */
#endif /* defined(__APPLE__) */
diff --git a/SP/code/SDL2/include/SDL_render.h b/SP/code/SDL2/include/SDL_render.h
index e4ed2af..60c87b6 100644
--- a/SP/code/SDL2/include/SDL_render.h
+++ b/SP/code/SDL2/include/SDL_render.h
@@ -500,6 +500,30 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
/**
+ * \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ * \param renderer The renderer for which integer scaling should be set.
+ * \param enable Enable or disable integer scaling
+ *
+ * This function restricts the logical viewport to integer values - that is, when
+ * a resolution is between two multiples of a logical size, the viewport size is
+ * rounded down to the lower multiple.
+ *
+ * \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+ SDL_bool enable);
+
+/**
+ * \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ * \param renderer The renderer from which integer scaling should be queried.
+ *
+ * \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
+/**
* \brief Set the drawing area for rendering on the current target.
*
* \param renderer The renderer for which the drawing area should be set.
@@ -658,7 +682,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
/**
* \brief Clear the current rendering target with the drawing color
*
- * This function clears the entire rendering target, ignoring the viewport.
+ * This function clears the entire rendering target, ignoring the viewport and
+ * the clip rectangle.
*
* \return 0 on success, or -1 on error
*/
diff --git a/SP/code/SDL2/include/SDL_revision.h b/SP/code/SDL2/include/SDL_revision.h
index 6d7163d..341dc5c 100644
--- a/SP/code/SDL2/include/SDL_revision.h
+++ b/SP/code/SDL2/include/SDL_revision.h
@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
diff --git a/SP/code/SDL2/include/SDL_rwops.h b/SP/code/SDL2/include/SDL_rwops.h
index f460ae7..1ad3ac4 100644
--- a/SP/code/SDL2/include/SDL_rwops.h
+++ b/SP/code/SDL2/include/SDL_rwops.h
@@ -39,12 +39,12 @@ extern "C" {
#endif
/* RWops Types */
-#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
-#define SDL_RWOPS_WINFILE 1 /* Win32 file */
-#define SDL_RWOPS_STDFILE 2 /* Stdio file */
-#define SDL_RWOPS_JNIFILE 3 /* Android asset */
-#define SDL_RWOPS_MEMORY 4 /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN 0U /* Unknown stream type */
+#define SDL_RWOPS_WINFILE 1U /* Win32 file */
+#define SDL_RWOPS_STDFILE 2U /* Stdio file */
+#define SDL_RWOPS_JNIFILE 3U /* Android asset */
+#define SDL_RWOPS_MEMORY 4U /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U /* Read-Only memory stream */
/**
* This is the read/write operation structure -- very basic.
diff --git a/SP/code/SDL2/include/SDL_stdinc.h b/SP/code/SDL2/include/SDL_stdinc.h
index 887bcd2..fdf9641 100644
--- a/SP/code/SDL2/include/SDL_stdinc.h
+++ b/SP/code/SDL2/include/SDL_stdinc.h
@@ -83,9 +83,6 @@
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
/**
* The number of elements in an array.
@@ -94,6 +91,13 @@
#define SDL_TABLESIZE(table) SDL_arraysize(table)
/**
+ * Macro useful for building other macros with strings in them
+ *
+ * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg) #arg
+
+/**
* \name Cast operators
*
* Use proper C++ casts when compiled as C++ to be compatible with the option
diff --git a/SP/code/SDL2/include/SDL_surface.h b/SP/code/SDL2/include/SDL_surface.h
index e63ca89..e4a06a2 100644
--- a/SP/code/SDL2/include/SDL_surface.h
+++ b/SP/code/SDL2/include/SDL_surface.h
@@ -118,6 +118,8 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
(Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+ (Uint32 flags, int width, int height, int depth, Uint32 format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
int width,
int height,
@@ -127,6 +129,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+ (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
/**
@@ -184,6 +188,12 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
/**
* Save a surface to a seekable SDL data stream (memory or file).
*
+ * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ * BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ * not supported.
+ *
* If \c freedst is non-zero, the stream will be closed after being written.
*
* \return 0 if successful or -1 if there was an error.
diff --git a/SP/code/SDL2/include/SDL_syswm.h b/SP/code/SDL2/include/SDL_syswm.h
index 1056e52..71ba5f1 100644
--- a/SP/code/SDL2/include/SDL_syswm.h
+++ b/SP/code/SDL2/include/SDL_syswm.h
@@ -106,6 +106,10 @@ typedef struct ANativeWindow ANativeWindow;
typedef void *EGLSurface;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
/**
* These are the various supported windowing subsystems
*/
@@ -120,7 +124,8 @@ typedef enum
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT,
- SDL_SYSWM_ANDROID
+ SDL_SYSWM_ANDROID,
+ SDL_SYSWM_VIVANTE
} SDL_SYSWM_TYPE;
/**
@@ -167,6 +172,13 @@ struct SDL_SysWMmsg
/* No UIKit window events yet */
} uikit;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ int dummy;
+ /* No Vivante window events yet */
+ } vivante;
+#endif
/* Can't have an empty union */
int dummy;
} msg;
@@ -259,6 +271,14 @@ struct SDL_SysWMinfo
} android;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ EGLNativeDisplayType display;
+ EGLNativeWindowType window;
+ } vivante;
+#endif
+
/* Can't have an empty union */
int dummy;
} info;
diff --git a/SP/code/SDL2/include/SDL_version.h b/SP/code/SDL2/include/SDL_version.h
index de1f160..1700efd 100644
--- a/SP/code/SDL2/include/SDL_version.h
+++ b/SP/code/SDL2/include/SDL_version.h
@@ -59,7 +59,7 @@ typedef struct SDL_version
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 4
+#define SDL_PATCHLEVEL 5
/**
* \brief Macro to determine SDL version program was compiled against.
diff --git a/SP/code/SDL2/include/SDL_video.h b/SP/code/SDL2/include/SDL_video.h
index 52dbbc7..73c33eb 100644
--- a/SP/code/SDL2/include/SDL_video.h
+++ b/SP/code/SDL2/include/SDL_video.h
@@ -83,6 +83,7 @@ typedef struct
* \sa SDL_SetWindowPosition()
* \sa SDL_SetWindowSize()
* \sa SDL_SetWindowBordered()
+ * \sa SDL_SetWindowResizable()
* \sa SDL_SetWindowTitle()
* \sa SDL_ShowWindow()
*/
@@ -95,6 +96,7 @@ typedef struct SDL_Window SDL_Window;
*/
typedef enum
{
+ /* !!! FIXME: change this to name = (1<<x). */
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
@@ -109,13 +111,18 @@ typedef enum
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported */
- SDL_WINDOW_MOUSE_CAPTURE = 0x00004000 /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
+ SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
+ SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
+ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
+ SDL_WINDOW_POPUP_MENU = 0x00080000 /**< window should be treated as a popup menu */
} SDL_WindowFlags;
/**
* \brief Used to indicate that you don't care what the window position is.
*/
-#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
@@ -124,7 +131,7 @@ typedef enum
/**
* \brief Used to indicate that the window position should be centered.
*/
-#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
@@ -154,8 +161,9 @@ typedef enum
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
- SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
- window be closed */
+ SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
+ SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+ SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
} SDL_WindowEventID;
/**
@@ -311,6 +319,25 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * re
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
/**
+ * \brief Get the usable desktop area represented by a display, with the
+ * primary display located at 0,0
+ *
+ * This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ * reserved by the system removed. For example, on Mac OS X, this subtracts
+ * the area occupied by the menu bar and dock.
+ *
+ * Setting a window to be fullscreen generally bypasses these unusable areas,
+ * so these are good guidelines for the maximum space available to a
+ * non-fullscreen window.
+ *
+ * \return 0 on success, or -1 if the index is out of range.
+ *
+ * \sa SDL_GetDisplayBounds()
+ * \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
+/**
* \brief Returns the number of available display modes.
*
* \sa SDL_GetDisplayMode()
@@ -423,7 +450,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
* ::SDL_WINDOW_ALLOW_HIGHDPI.
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
* in pixels may differ from its size in screen coordinates on platforms with
@@ -442,7 +469,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
*
* \param data A pointer to driver-dependent window creation data
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* \sa SDL_DestroyWindow()
*/
@@ -587,6 +614,25 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
int *h);
/**
+ * \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ * \param window The window to query.
+ * \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ * \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ * \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ * \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ * \return 0 on success, or -1 if getting this information is not supported.
+ *
+ * \note if this function fails (returns -1), the size values will be
+ * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ * if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+ int *top, int *left,
+ int *bottom, int *right);
+
+/**
* \brief Set the minimum size of a window's client area.
*
* \param window The window to set a new minimum size.
@@ -662,6 +708,23 @@ extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
SDL_bool bordered);
/**
+ * \brief Set the user-resizable state of a window.
+ *
+ * This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ * allow/disallow user resizing of the window. This is a no-op if the
+ * window's resizable state already matches the requested state.
+ *
+ * \param window The window of which to change the resizable state.
+ * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ * \note You can't change the resizable state of a fullscreen window.
+ *
+ * \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+ SDL_bool resizable);
+
+/**
* \brief Show a window.
*
* \sa SDL_HideWindow()
@@ -744,7 +807,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
* \return 0 on success, or -1 on error.
*
* \sa SDL_GetWindowSurface()
- * \sa SDL_UpdateWindowSurfaceRect()
+ * \sa SDL_UpdateWindowSurface()
*/
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
const SDL_Rect * rects,
@@ -802,6 +865,58 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
/**
+ * \brief Set the opacity for a window
+ *
+ * \param window The window which will be made transparent or opaque
+ * \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ * clamped internally between 0.0f and 1.0f.
+ *
+ * \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ * \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ * \brief Get the opacity of a window.
+ *
+ * If transparency isn't supported on this platform, opacity will be reported
+ * as 1.0f without error.
+ *
+ * \param window The window in question.
+ * \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ * \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ * \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ * \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ * \param modal_window The window that should be modal
+ * \param parent_window The parent window
+ *
+ * \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ * \brief Explicitly sets input focus to the window.
+ *
+ * You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ * this with caution, as you might give focus to a window that's completely
+ * obscured by other windows.
+ *
+ * \param window The window that should get the input focus
+ *
+ * \return 0 on success, or -1 otherwise.
+ * \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
+/**
* \brief Set the gamma ramp for a window.
*
* \param window The window for which the gamma ramp should be set.
@@ -920,7 +1035,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
/**
- * \brief Returns whether the screensaver is currently enabled (default on).
+ * \brief Returns whether the screensaver is currently enabled (default off).
*
* \sa SDL_EnableScreenSaver()
* \sa SDL_DisableScreenSaver()
diff --git a/SP/code/libs/linux32/libSDL2-2.0.so.0.4.0 b/SP/code/libs/linux32/libSDL2-2.0.so.0.4.0
deleted file mode 100755
index d6f458d..0000000
Binary files a/SP/code/libs/linux32/libSDL2-2.0.so.0.4.0 and /dev/null differ
diff --git a/SP/code/libs/linux32/libSDL2-2.0.so.0.4.1 b/SP/code/libs/linux32/libSDL2-2.0.so.0.4.1
new file mode 100755
index 0000000..4b939e8
Binary files /dev/null and b/SP/code/libs/linux32/libSDL2-2.0.so.0.4.1 differ
diff --git a/SP/code/libs/linux32/libSDL2main.a b/SP/code/libs/linux32/libSDL2main.a
index 2e1be34..90b2903 100644
Binary files a/SP/code/libs/linux32/libSDL2main.a and b/SP/code/libs/linux32/libSDL2main.a differ
diff --git a/MP/code/libs/linux64/libSDL2-2.0.so.0.4.0 b/SP/code/libs/linux64/libSDL2-2.0.so.0.4.1
similarity index 51%
rename from MP/code/libs/linux64/libSDL2-2.0.so.0.4.0
rename to SP/code/libs/linux64/libSDL2-2.0.so.0.4.1
index 359a3f2..06fcb78 100755
Binary files a/MP/code/libs/linux64/libSDL2-2.0.so.0.4.0 and b/SP/code/libs/linux64/libSDL2-2.0.so.0.4.1 differ
diff --git a/SP/code/libs/linux64/libSDL2main.a b/SP/code/libs/linux64/libSDL2main.a
index df6a430..b0fd4bd 100644
Binary files a/SP/code/libs/linux64/libSDL2main.a and b/SP/code/libs/linux64/libSDL2main.a differ
diff --git a/SP/code/libs/macosx/libSDL2-2.0.0.dylib b/SP/code/libs/macosx/libSDL2-2.0.0.dylib
index a14c323..85a4d39 100755
Binary files a/SP/code/libs/macosx/libSDL2-2.0.0.dylib and b/SP/code/libs/macosx/libSDL2-2.0.0.dylib differ
diff --git a/SP/code/libs/macosx/libSDL2main.a b/SP/code/libs/macosx/libSDL2main.a
index 4364d15..f25dfbe 100644
Binary files a/SP/code/libs/macosx/libSDL2main.a and b/SP/code/libs/macosx/libSDL2main.a differ
diff --git a/SP/code/libs/win32/SDL2.dll b/SP/code/libs/win32/SDL2.dll
index 10cca80..2b7e319 100755
Binary files a/SP/code/libs/win32/SDL2.dll and b/SP/code/libs/win32/SDL2.dll differ
diff --git a/SP/code/libs/win32/libSDL2.dll.a b/SP/code/libs/win32/libSDL2.dll.a
index e5d5a94..26f9686 100644
Binary files a/SP/code/libs/win32/libSDL2.dll.a and b/SP/code/libs/win32/libSDL2.dll.a differ
diff --git a/SP/code/libs/win32/libSDL2main.a b/SP/code/libs/win32/libSDL2main.a
index 6e9ce3d..4cf4727 100644
Binary files a/SP/code/libs/win32/libSDL2main.a and b/SP/code/libs/win32/libSDL2main.a differ
diff --git a/SP/code/libs/win64/SDL264.dll b/SP/code/libs/win64/SDL264.dll
index 61c5bac..8e0c64c 100755
Binary files a/SP/code/libs/win64/SDL264.dll and b/SP/code/libs/win64/SDL264.dll differ
diff --git a/SP/code/libs/win64/libSDL264.dll.a b/SP/code/libs/win64/libSDL264.dll.a
index 4d866e7..c544d65 100644
Binary files a/SP/code/libs/win64/libSDL264.dll.a and b/SP/code/libs/win64/libSDL264.dll.a differ
diff --git a/SP/code/libs/win64/libSDL264main.a b/SP/code/libs/win64/libSDL264main.a
index d5b6a26..38a02de 100644
Binary files a/SP/code/libs/win64/libSDL264main.a and b/SP/code/libs/win64/libSDL264main.a differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list