[iortcw] 72/497: All: update SDL to version 2.0.3
Simon McVittie
smcv at debian.org
Fri Sep 8 10:36:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit fb3431151024a2a96dbc6cf47f4e9b151f854c3d
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date: Sun Mar 16 13:47:31 2014 +0000
All: update SDL to version 2.0.3
---
MP/code/SDL2/include/SDL_config.h | 2 +
MP/code/SDL2/include/SDL_config.h.cmake | 1 +
MP/code/SDL2/include/SDL_config.h.in | 1 +
MP/code/SDL2/include/SDL_config_windows.h | 3 +
.../code/SDL2/include/SDL_config_winrt.h | 101 +++++++++------------
MP/code/SDL2/include/SDL_cpuinfo.h | 2 +-
MP/code/SDL2/include/SDL_egl.h | 7 ++
MP/code/SDL2/include/SDL_hints.h | 71 ++++++++++++++-
MP/code/SDL2/include/SDL_main.h | 30 ++++++
MP/code/SDL2/include/SDL_name.h | 22 +++++
MP/code/SDL2/include/SDL_platform.h | 16 ++++
MP/code/SDL2/include/SDL_revision.h | 4 +-
MP/code/SDL2/include/SDL_stdinc.h | 10 ++
MP/code/SDL2/include/SDL_system.h | 64 +++++++++++++
MP/code/SDL2/include/SDL_syswm.h | 12 +++
MP/code/SDL2/include/SDL_version.h | 2 +-
MP/code/SDL2/include/begin_code.h | 4 +-
MP/code/libs/macosx/libSDL2-2.0.0.dylib | Bin 4504388 -> 4509204 bytes
MP/code/libs/macosx/libSDL2main.a | Bin 10892 -> 10892 bytes
MP/code/libs/win32/SDL2.dll | Bin 4611029 -> 4618565 bytes
MP/code/libs/win32/libSDL2.a | Bin 6149078 -> 6157810 bytes
MP/code/libs/win32/libSDL2.dll.a | Bin 344564 -> 344564 bytes
MP/code/libs/win32/libSDL2main.a | Bin 7554 -> 7558 bytes
MP/code/libs/win64/SDL264.dll | Bin 6157282 -> 6170550 bytes
MP/code/libs/win64/libSDL264.a | Bin 7794730 -> 7810478 bytes
MP/code/libs/win64/libSDL264.dll.a | Bin 337996 -> 337996 bytes
MP/code/libs/win64/libSDL264main.a | Bin 9108 -> 9108 bytes
SP/code/SDL2/include/SDL_config.h | 2 +
SP/code/SDL2/include/SDL_config.h.cmake | 1 +
SP/code/SDL2/include/SDL_config.h.in | 1 +
SP/code/SDL2/include/SDL_config_windows.h | 3 +
.../{SDL_config_windows.h => SDL_config_winrt.h} | 101 +++++++++------------
SP/code/SDL2/include/SDL_cpuinfo.h | 2 +-
SP/code/SDL2/include/SDL_egl.h | 7 ++
SP/code/SDL2/include/SDL_hints.h | 71 ++++++++++++++-
SP/code/SDL2/include/SDL_main.h | 30 ++++++
SP/code/SDL2/include/SDL_name.h | 22 +++++
SP/code/SDL2/include/SDL_platform.h | 16 ++++
SP/code/SDL2/include/SDL_revision.h | 4 +-
SP/code/SDL2/include/SDL_stdinc.h | 10 ++
SP/code/SDL2/include/SDL_system.h | 64 +++++++++++++
SP/code/SDL2/include/SDL_syswm.h | 12 +++
SP/code/SDL2/include/SDL_version.h | 2 +-
SP/code/SDL2/include/begin_code.h | 4 +-
SP/code/libs/macosx/libSDL2-2.0.0.dylib | Bin 4504388 -> 4509204 bytes
SP/code/libs/macosx/libSDL2main.a | Bin 10892 -> 10892 bytes
SP/code/libs/win32/SDL2.dll | Bin 4611029 -> 4618565 bytes
SP/code/libs/win32/libSDL2.a | Bin 6149078 -> 6157810 bytes
SP/code/libs/win32/libSDL2.dll.a | Bin 344564 -> 344564 bytes
SP/code/libs/win32/libSDL2main.a | Bin 7554 -> 7558 bytes
SP/code/libs/win64/SDL264.dll | Bin 6157282 -> 6170550 bytes
SP/code/libs/win64/libSDL264.a | Bin 7794730 -> 7810478 bytes
SP/code/libs/win64/libSDL264.dll.a | Bin 337996 -> 337996 bytes
SP/code/libs/win64/libSDL264main.a | Bin 9108 -> 9108 bytes
54 files changed, 572 insertions(+), 132 deletions(-)
diff --git a/MP/code/SDL2/include/SDL_config.h b/MP/code/SDL2/include/SDL_config.h
index d46573b..9a2e51c 100644
--- a/MP/code/SDL2/include/SDL_config.h
+++ b/MP/code/SDL2/include/SDL_config.h
@@ -33,6 +33,8 @@
#include "SDL_config_premake.h"
#elif defined(__WIN32__)
#include "SDL_config_windows.h"
+#elif defined(__WINRT__)
+#include "SDL_config_winrt.h"
#elif defined(__MACOSX__)
#include "SDL_config_macosx.h"
#elif defined(__IPHONEOS__)
diff --git a/MP/code/SDL2/include/SDL_config.h.cmake b/MP/code/SDL2/include/SDL_config.h.cmake
index 41bc9e1..b6fb53a 100644
--- a/MP/code/SDL2/include/SDL_config.h.cmake
+++ b/MP/code/SDL2/include/SDL_config.h.cmake
@@ -295,6 +295,7 @@
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
+#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
diff --git a/MP/code/SDL2/include/SDL_config.h.in b/MP/code/SDL2/include/SDL_config.h.in
index 9ad2d3d..689dcf8 100644
--- a/MP/code/SDL2/include/SDL_config.h.in
+++ b/MP/code/SDL2/include/SDL_config.h.in
@@ -294,6 +294,7 @@
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
#undef SDL_VIDEO_RENDER_D3D
+#undef SDL_VIDEO_RENDER_D3D11
#undef SDL_VIDEO_RENDER_OGL
#undef SDL_VIDEO_RENDER_OGL_ES
#undef SDL_VIDEO_RENDER_OGL_ES2
diff --git a/MP/code/SDL2/include/SDL_config_windows.h b/MP/code/SDL2/include/SDL_config_windows.h
index 0be3260..35eda46 100644
--- a/MP/code/SDL2/include/SDL_config_windows.h
+++ b/MP/code/SDL2/include/SDL_config_windows.h
@@ -171,6 +171,9 @@ typedef unsigned int uintptr_t;
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 1
#endif
+#ifndef SDL_VIDEO_RENDER_D3D11
+#define SDL_VIDEO_RENDER_D3D11 0
+#endif
/* Enable OpenGL support */
#ifndef SDL_VIDEO_OPENGL
diff --git a/SP/code/SDL2/include/SDL_config_windows.h b/MP/code/SDL2/include/SDL_config_winrt.h
similarity index 71%
copy from SP/code/SDL2/include/SDL_config_windows.h
copy to MP/code/SDL2/include/SDL_config_winrt.h
index 0be3260..78b43ab 100644
--- a/SP/code/SDL2/include/SDL_config_windows.h
+++ b/MP/code/SDL2/include/SDL_config_winrt.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2014 Sam Lantinga <slouken at libsdl.org>
+ Copyright (C) 1997-2012 Sam Lantinga <slouken at libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -28,7 +28,7 @@
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H 1
+#define HAVE_STDINT_H 1
#elif defined(_MSC_VER)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
@@ -76,14 +76,14 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
-/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
-#ifdef HAVE_LIBC
/* Useful headers */
+#define HAVE_LIBC 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
#define HAVE_STRING_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
+#define HAVE_FLOAT_H 1
#define HAVE_SIGNAL_H 1
/* C library functions */
@@ -101,14 +101,16 @@ typedef unsigned int uintptr_t;
#define HAVE_STRLEN 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
-#define HAVE__STRLWR 1
+//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
-#define HAVE__LTOA 1
-#define HAVE__ULTOA 1
+//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
+//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
+//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
+//#define HAVE_STRTOLL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
@@ -116,92 +118,73 @@ typedef unsigned int uintptr_t;
#define HAVE_STRNCMP 1
#define HAVE__STRICMP 1
#define HAVE__STRNICMP 1
+#define HAVE_VSNPRINTF 1
+//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
+#define HAVE_M_PI 1
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
-#define HAVE_ACOS 1
-#define HAVE_ASIN 1
#define HAVE_CEIL 1
+#define HAVE__COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_LOG 1
#define HAVE_POW 1
+//#define HAVE_SCALBN 1
+#define HAVE__SCALB 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#endif
+#define HAVE__FSEEKI64 1
/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2 1
-#define SDL_AUDIO_DRIVER_WINMM 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
+#define SDL_AUDIO_DRIVER_XAUDIO2 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */
-#define SDL_JOYSTICK_DINPUT 1
-#define SDL_HAPTIC_DINPUT 1
+// TODO, WinRT: Get haptic support working
+#define SDL_HAPTIC_DISABLED 1
+
+#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
+#define SDL_JOYSTICK_DISABLED 1
+#else
+#define SDL_JOYSTICK_XINPUT 1
+#endif
/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS 1
+#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS 1
+#define SDL_THREAD_STDCPP 1
/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS 1
+#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_WINRT 1
#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 1
+/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
+#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */
+#define SDL_VIDEO_OPENGL_ES2 1
+#define SDL_VIDEO_OPENGL_EGL 1
#endif
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
+/* Enable appropriate renderer(s) */
+#define SDL_VIDEO_RENDER_D3D11 1
+#if SDL_VIDEO_OPENGL_ES2
+#define SDL_VIDEO_RENDER_OGL_ES2 1
+#endif
/* Enable system power support */
-#define SDL_POWER_WINDOWS 1
-
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS 1
+#define SDL_POWER_WINRT 1
/* Enable assembly routines (Win64 doesn't have inline asm) */
#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES 1
+#define SDL_ASSEMBLY_ROUTINES 1
#endif
#endif /* _SDL_config_windows_h */
diff --git a/MP/code/SDL2/include/SDL_cpuinfo.h b/MP/code/SDL2/include/SDL_cpuinfo.h
index b8eb278..1f6efd3 100644
--- a/MP/code/SDL2/include/SDL_cpuinfo.h
+++ b/MP/code/SDL2/include/SDL_cpuinfo.h
@@ -32,7 +32,7 @@
/* Need to do this here because intrin.h has C++ code in it */
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
#include <intrin.h>
#ifndef _WIN64
#define __MMX__
diff --git a/MP/code/SDL2/include/SDL_egl.h b/MP/code/SDL2/include/SDL_egl.h
index bda7c50..d312f04 100644
--- a/MP/code/SDL2/include/SDL_egl.h
+++ b/MP/code/SDL2/include/SDL_egl.h
@@ -391,9 +391,16 @@ typedef enum {
#endif
#include <windows.h>
+#if __WINRT__
+#include <Unknwn.h>
+typedef IUnknown * EGLNativeWindowType;
+typedef int EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+#else
typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
typedef HWND EGLNativeWindowType;
+#endif
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
diff --git a/MP/code/SDL2/include/SDL_hints.h b/MP/code/SDL2/include/SDL_hints.h
index a7c0162..b98ce68 100644
--- a/MP/code/SDL2/include/SDL_hints.h
+++ b/MP/code/SDL2/include/SDL_hints.h
@@ -106,6 +106,19 @@ extern "C" {
#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
/**
+ * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
+ *
+ * This variable does not have any effect on the Direct3D 9 based renderer.
+ *
+ * This variable can be set to the following values:
+ * "0" - Disable Debug Layer use
+ * "1" - Enable Debug Layer use
+ *
+ * By default, SDL does not use Direct3D Debug Layer.
+ */
+#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
+
+/**
* \brief A variable controlling the scaling quality
*
* This variable can be set to the following values:
@@ -334,7 +347,7 @@ extern "C" {
* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
* created SDL_Window:
-
+*
* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
* needed for example when sharing an OpenGL context across multiple windows.
*
@@ -347,6 +360,62 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
+/*
+ * \brief A URL to a WinRT app's privacy policy
+ *
+ * All network-enabled WinRT apps must make a privacy policy available to its
+ * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
+ * be available in the Windows Settings charm, as accessed from within the app.
+ * SDL provides code to add a URL-based link there, which can point to the app's
+ * 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
+ * be a valid URL. For example, "http://www.example.com".
+ *
+ * The default value is "", which will prevent SDL from adding a privacy policy
+ * link to the Settings charm. This hint should only be set during app init.
+ *
+ * The label text of an app's "Privacy Policy" link may be customized via another
+ * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
+ *
+ * Please note that on Windows Phone, Microsoft does not provide standard UI
+ * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
+ * will not get used on that platform. Network-enabled phone apps should display
+ * their privacy policy through some other, in-app means.
+ */
+#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
+
+/** \brief Label text for a WinRT app's privacy policy link
+ *
+ * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
+ * Microsoft mandates that this policy be available via the Windows Settings charm.
+ * SDL provides code to add a link there, with it's label text being set via the
+ * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
+ *
+ * Please note that a privacy policy's contents are not set via this hint. A separate
+ * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
+ * policy.
+ *
+ * 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.
+ *
+ * For additional information on linking to a privacy policy, see the documentation for
+ * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
+ */
+#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
+
+/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
+ *
+ * TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
+ * For now, more details on why this is needed can be found at the
+ * beginning of the following web page:
+ * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
+ */
+#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
+
/**
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
*
diff --git a/MP/code/SDL2/include/SDL_main.h b/MP/code/SDL2/include/SDL_main.h
index 1f2bad3..2e8fae9 100644
--- a/MP/code/SDL2/include/SDL_main.h
+++ b/MP/code/SDL2/include/SDL_main.h
@@ -39,6 +39,18 @@
*/
#define SDL_MAIN_AVAILABLE
+#elif defined(__WINRT__)
+/* On WinRT, SDL provides a main function that initializes CoreApplication,
+ creating an instance of IFrameworkView in the process.
+
+ Please note that #include'ing SDL_main.h is not enough to get a main()
+ function working. In non-XAML apps, the file,
+ src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
+ into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
+ called, with a pointer to the Direct3D-hosted XAML control passed in.
+*/
+#define SDL_MAIN_NEEDED
+
#elif defined(__IPHONEOS__)
/* On iOS SDL provides a main function that creates an application delegate
and starts the iOS application run loop.
@@ -115,6 +127,24 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#endif /* __WIN32__ */
+#ifdef __WINRT__
+
+/**
+ * \brief Initializes and launches an SDL/WinRT application.
+ *
+ * \param mainFunction The SDL app's C-style main().
+ * \param xamlBackgroundPanel An optional, XAML-based, background panel.
+ * For Non-XAML apps, this value must be set to NULL. For XAML apps,
+ * pass in a pointer to a SwapChainBackgroundPanel, casted to an
+ * IInspectable (via reinterpret_cast).
+ * \ret 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
+ * information on the failure.
+ */
+extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel);
+
+#endif /* __WINRT__ */
+
+
#ifdef __cplusplus
}
#endif
diff --git a/MP/code/SDL2/include/SDL_name.h b/MP/code/SDL2/include/SDL_name.h
index d0469e1..719666f 100644
--- a/MP/code/SDL2/include/SDL_name.h
+++ b/MP/code/SDL2/include/SDL_name.h
@@ -1,3 +1,23 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken at libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
#ifndef _SDLname_h_
#define _SDLname_h_
@@ -9,3 +29,5 @@
#define SDL_NAME(X) SDL_##X
#endif /* _SDLname_h_ */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/MP/code/SDL2/include/SDL_platform.h b/MP/code/SDL2/include/SDL_platform.h
index afe3389..68b02a1 100644
--- a/MP/code/SDL2/include/SDL_platform.h
+++ b/MP/code/SDL2/include/SDL_platform.h
@@ -113,10 +113,26 @@
#undef __SOLARIS__
#define __SOLARIS__ 1
#endif
+
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
+/* Try to find out if we're compiling for WinRT or non-WinRT */
+/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_ /* _MSC_VER==1700 for MSVC 2012 */
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#undef __WINDOWS__
#define __WINDOWS__ 1
+/* See if we're compiling for WinRT: */
+#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+#undef __WINRT__
+#define __WINRT__ 1
#endif
+#else
+#undef __WINDOWS__
+#define __WINDOWS__ 1
+#endif /* _MSC_VER < 1700 */
+#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
+
#if defined(__WINDOWS__)
#undef __WIN32__
#define __WIN32__ 1
diff --git a/MP/code/SDL2/include/SDL_revision.h b/MP/code/SDL2/include/SDL_revision.h
index 06ef668..a75dc33 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-8297:be2102f000d0"
-#define SDL_REVISION_NUMBER 8297
+#define SDL_REVISION "hg-8628:b558f99d48f0"
+#define SDL_REVISION_NUMBER 8628
diff --git a/MP/code/SDL2/include/SDL_stdinc.h b/MP/code/SDL2/include/SDL_stdinc.h
index 6de724e..31b343d 100644
--- a/MP/code/SDL2/include/SDL_stdinc.h
+++ b/MP/code/SDL2/include/SDL_stdinc.h
@@ -71,8 +71,18 @@
# include <ctype.h>
#endif
#ifdef HAVE_MATH_H
+# if defined(__WINRT__)
+/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
+ WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
+ for more information.
+*/
+# define _USE_MATH_DEFINES
+# endif
# include <math.h>
#endif
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
# include <iconv.h>
#endif
diff --git a/MP/code/SDL2/include/SDL_system.h b/MP/code/SDL2/include/SDL_system.h
index 99ef822..fd929f7 100644
--- a/MP/code/SDL2/include/SDL_system.h
+++ b/MP/code/SDL2/include/SDL_system.h
@@ -116,6 +116,70 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
#endif /* __ANDROID__ */
+/* Platform specific functions for WinRT */
+#if defined(__WINRT__) && __WINRT__
+
+/**
+ * \brief WinRT / Windows Phone path types
+ */
+typedef enum
+{
+ /** \brief The installed app's root directory.
+ Files here are likely to be read-only. */
+ SDL_WINRT_PATH_INSTALLED_LOCATION,
+
+ /** \brief The app's local data store. Files may be written here */
+ SDL_WINRT_PATH_LOCAL_FOLDER,
+
+ /** \brief The app's roaming data store. Unsupported on Windows Phone.
+ Files written here may be copied to other machines via a network
+ connection.
+ */
+ SDL_WINRT_PATH_ROAMING_FOLDER,
+
+ /** \brief The app's temporary data store. Unsupported on Windows Phone.
+ Files written here may be deleted at any time. */
+ SDL_WINRT_PATH_TEMP_FOLDER
+} SDL_WinRT_Path;
+
+
+/**
+ * \brief Retrieves a WinRT defined path on the local file system
+ *
+ * \note Documentation on most app-specific path types on WinRT
+ * can be found on MSDN, at the URL:
+ * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
+ *
+ * \param pathType The type of path to retrieve.
+ * \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
+ * if the path is not available for any reason. Not all paths are
+ * available on all versions of Windows. This is especially true on
+ * Windows Phone. Check the documentation for the given
+ * SDL_WinRT_Path for more information on which path types are
+ * supported where.
+ */
+extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
+
+/**
+ * \brief Retrieves a WinRT defined path on the local file system
+ *
+ * \note Documentation on most app-specific path types on WinRT
+ * can be found on MSDN, at the URL:
+ * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
+ *
+ * \param pathType The type of path to retrieve.
+ * \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
+ * if the path is not available for any reason. Not all paths are
+ * available on all versions of Windows. This is especially true on
+ * Windows Phone. Check the documentation for the given
+ * SDL_WinRT_Path for more information on which path types are
+ * supported where.
+ */
+extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
+
+#endif /* __WINRT__ */
+
+
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
diff --git a/MP/code/SDL2/include/SDL_syswm.h b/MP/code/SDL2/include/SDL_syswm.h
index 40e8ca7..a3fe738 100644
--- a/MP/code/SDL2/include/SDL_syswm.h
+++ b/MP/code/SDL2/include/SDL_syswm.h
@@ -56,6 +56,10 @@ struct SDL_SysWMinfo;
#include <windows.h>
#endif
+#if defined(SDL_VIDEO_DRIVER_WINRT)
+#include <Inspectable.h>
+#endif
+
/* This is the structure for custom window manager events */
#if defined(SDL_VIDEO_DRIVER_X11)
#if defined(__APPLE__) && defined(__MACH__)
@@ -90,6 +94,7 @@ typedef struct _NSWindow NSWindow;
#include <UIKit/UIKit.h>
#else
typedef struct _UIWindow UIWindow;
+typedef struct _UIViewController UIViewController;
#endif
#endif
@@ -111,6 +116,7 @@ typedef enum
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
+ SDL_SYSWM_WINRT,
} SDL_SYSWM_TYPE;
/**
@@ -175,6 +181,12 @@ struct SDL_SysWMinfo
HWND window; /**< The window handle */
} win;
#endif
+#if defined(SDL_VIDEO_DRIVER_WINRT)
+ struct
+ {
+ IInspectable * window; /**< The WinRT CoreWindow */
+ } winrt;
+#endif
#if defined(SDL_VIDEO_DRIVER_X11)
struct
{
diff --git a/MP/code/SDL2/include/SDL_version.h b/MP/code/SDL2/include/SDL_version.h
index 22e0f5e..d02898b 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 2
+#define SDL_PATCHLEVEL 3
/**
* \brief Macro to determine SDL version program was compiled against.
diff --git a/MP/code/SDL2/include/begin_code.h b/MP/code/SDL2/include/begin_code.h
index fbed7d4..f37ee36 100644
--- a/MP/code/SDL2/include/begin_code.h
+++ b/MP/code/SDL2/include/begin_code.h
@@ -43,7 +43,7 @@
/* Some compilers use a special export keyword */
#ifndef DECLSPEC
-# if defined(__WIN32__)
+# if defined(__WIN32__) || defined(__WINRT__)
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
@@ -66,7 +66,7 @@
/* By default SDL uses the C calling convention */
#ifndef SDLCALL
-#if defined(__WIN32__) && !defined(__GNUC__)
+#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
#define SDLCALL __cdecl
#else
#define SDLCALL
diff --git a/MP/code/libs/macosx/libSDL2-2.0.0.dylib b/MP/code/libs/macosx/libSDL2-2.0.0.dylib
index 8e16981..1fe3655 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 f04a424..e4b36f1 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 41108f2..b4397f6 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.a b/MP/code/libs/win32/libSDL2.a
index 43c0455..d1b5f45 100644
Binary files a/MP/code/libs/win32/libSDL2.a and b/MP/code/libs/win32/libSDL2.a differ
diff --git a/MP/code/libs/win32/libSDL2.dll.a b/MP/code/libs/win32/libSDL2.dll.a
index 7e1f3eb..d2a593b 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 7419a7d..1c85e5a 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 d79caa8..1da50b9 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.a b/MP/code/libs/win64/libSDL264.a
index 05b86da..3fed695 100644
Binary files a/MP/code/libs/win64/libSDL264.a and b/MP/code/libs/win64/libSDL264.a differ
diff --git a/MP/code/libs/win64/libSDL264.dll.a b/MP/code/libs/win64/libSDL264.dll.a
index 471c664..fd2ef7d 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 3f0338b..a4e59ff 100644
Binary files a/MP/code/libs/win64/libSDL264main.a and b/MP/code/libs/win64/libSDL264main.a differ
diff --git a/SP/code/SDL2/include/SDL_config.h b/SP/code/SDL2/include/SDL_config.h
index d46573b..9a2e51c 100644
--- a/SP/code/SDL2/include/SDL_config.h
+++ b/SP/code/SDL2/include/SDL_config.h
@@ -33,6 +33,8 @@
#include "SDL_config_premake.h"
#elif defined(__WIN32__)
#include "SDL_config_windows.h"
+#elif defined(__WINRT__)
+#include "SDL_config_winrt.h"
#elif defined(__MACOSX__)
#include "SDL_config_macosx.h"
#elif defined(__IPHONEOS__)
diff --git a/SP/code/SDL2/include/SDL_config.h.cmake b/SP/code/SDL2/include/SDL_config.h.cmake
index 41bc9e1..b6fb53a 100644
--- a/SP/code/SDL2/include/SDL_config.h.cmake
+++ b/SP/code/SDL2/include/SDL_config.h.cmake
@@ -295,6 +295,7 @@
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
+#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
diff --git a/SP/code/SDL2/include/SDL_config.h.in b/SP/code/SDL2/include/SDL_config.h.in
index 9ad2d3d..689dcf8 100644
--- a/SP/code/SDL2/include/SDL_config.h.in
+++ b/SP/code/SDL2/include/SDL_config.h.in
@@ -294,6 +294,7 @@
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
#undef SDL_VIDEO_RENDER_D3D
+#undef SDL_VIDEO_RENDER_D3D11
#undef SDL_VIDEO_RENDER_OGL
#undef SDL_VIDEO_RENDER_OGL_ES
#undef SDL_VIDEO_RENDER_OGL_ES2
diff --git a/SP/code/SDL2/include/SDL_config_windows.h b/SP/code/SDL2/include/SDL_config_windows.h
index 0be3260..35eda46 100644
--- a/SP/code/SDL2/include/SDL_config_windows.h
+++ b/SP/code/SDL2/include/SDL_config_windows.h
@@ -171,6 +171,9 @@ typedef unsigned int uintptr_t;
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 1
#endif
+#ifndef SDL_VIDEO_RENDER_D3D11
+#define SDL_VIDEO_RENDER_D3D11 0
+#endif
/* Enable OpenGL support */
#ifndef SDL_VIDEO_OPENGL
diff --git a/SP/code/SDL2/include/SDL_config_windows.h b/SP/code/SDL2/include/SDL_config_winrt.h
similarity index 71%
copy from SP/code/SDL2/include/SDL_config_windows.h
copy to SP/code/SDL2/include/SDL_config_winrt.h
index 0be3260..78b43ab 100644
--- a/SP/code/SDL2/include/SDL_config_windows.h
+++ b/SP/code/SDL2/include/SDL_config_winrt.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2014 Sam Lantinga <slouken at libsdl.org>
+ Copyright (C) 1997-2012 Sam Lantinga <slouken at libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -28,7 +28,7 @@
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H 1
+#define HAVE_STDINT_H 1
#elif defined(_MSC_VER)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
@@ -76,14 +76,14 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
-/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
-#ifdef HAVE_LIBC
/* Useful headers */
+#define HAVE_LIBC 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
#define HAVE_STRING_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
+#define HAVE_FLOAT_H 1
#define HAVE_SIGNAL_H 1
/* C library functions */
@@ -101,14 +101,16 @@ typedef unsigned int uintptr_t;
#define HAVE_STRLEN 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
-#define HAVE__STRLWR 1
+//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
-#define HAVE__LTOA 1
-#define HAVE__ULTOA 1
+//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
+//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
+//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
+//#define HAVE_STRTOLL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
@@ -116,92 +118,73 @@ typedef unsigned int uintptr_t;
#define HAVE_STRNCMP 1
#define HAVE__STRICMP 1
#define HAVE__STRNICMP 1
+#define HAVE_VSNPRINTF 1
+//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
+#define HAVE_M_PI 1
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
-#define HAVE_ACOS 1
-#define HAVE_ASIN 1
#define HAVE_CEIL 1
+#define HAVE__COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_LOG 1
#define HAVE_POW 1
+//#define HAVE_SCALBN 1
+#define HAVE__SCALB 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#endif
+#define HAVE__FSEEKI64 1
/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2 1
-#define SDL_AUDIO_DRIVER_WINMM 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
+#define SDL_AUDIO_DRIVER_XAUDIO2 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */
-#define SDL_JOYSTICK_DINPUT 1
-#define SDL_HAPTIC_DINPUT 1
+// TODO, WinRT: Get haptic support working
+#define SDL_HAPTIC_DISABLED 1
+
+#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
+#define SDL_JOYSTICK_DISABLED 1
+#else
+#define SDL_JOYSTICK_XINPUT 1
+#endif
/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS 1
+#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS 1
+#define SDL_THREAD_STDCPP 1
/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS 1
+#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_WINRT 1
#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 1
+/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
+#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */
+#define SDL_VIDEO_OPENGL_ES2 1
+#define SDL_VIDEO_OPENGL_EGL 1
#endif
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
+/* Enable appropriate renderer(s) */
+#define SDL_VIDEO_RENDER_D3D11 1
+#if SDL_VIDEO_OPENGL_ES2
+#define SDL_VIDEO_RENDER_OGL_ES2 1
+#endif
/* Enable system power support */
-#define SDL_POWER_WINDOWS 1
-
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS 1
+#define SDL_POWER_WINRT 1
/* Enable assembly routines (Win64 doesn't have inline asm) */
#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES 1
+#define SDL_ASSEMBLY_ROUTINES 1
#endif
#endif /* _SDL_config_windows_h */
diff --git a/SP/code/SDL2/include/SDL_cpuinfo.h b/SP/code/SDL2/include/SDL_cpuinfo.h
index b8eb278..1f6efd3 100644
--- a/SP/code/SDL2/include/SDL_cpuinfo.h
+++ b/SP/code/SDL2/include/SDL_cpuinfo.h
@@ -32,7 +32,7 @@
/* Need to do this here because intrin.h has C++ code in it */
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
-#if defined(_MSC_VER) && (_MSC_VER >= 1500)
+#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
#include <intrin.h>
#ifndef _WIN64
#define __MMX__
diff --git a/SP/code/SDL2/include/SDL_egl.h b/SP/code/SDL2/include/SDL_egl.h
index bda7c50..d312f04 100644
--- a/SP/code/SDL2/include/SDL_egl.h
+++ b/SP/code/SDL2/include/SDL_egl.h
@@ -391,9 +391,16 @@ typedef enum {
#endif
#include <windows.h>
+#if __WINRT__
+#include <Unknwn.h>
+typedef IUnknown * EGLNativeWindowType;
+typedef int EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+#else
typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
typedef HWND EGLNativeWindowType;
+#endif
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
diff --git a/SP/code/SDL2/include/SDL_hints.h b/SP/code/SDL2/include/SDL_hints.h
index a7c0162..b98ce68 100644
--- a/SP/code/SDL2/include/SDL_hints.h
+++ b/SP/code/SDL2/include/SDL_hints.h
@@ -106,6 +106,19 @@ extern "C" {
#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
/**
+ * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
+ *
+ * This variable does not have any effect on the Direct3D 9 based renderer.
+ *
+ * This variable can be set to the following values:
+ * "0" - Disable Debug Layer use
+ * "1" - Enable Debug Layer use
+ *
+ * By default, SDL does not use Direct3D Debug Layer.
+ */
+#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
+
+/**
* \brief A variable controlling the scaling quality
*
* This variable can be set to the following values:
@@ -334,7 +347,7 @@ extern "C" {
* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
* created SDL_Window:
-
+*
* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
* needed for example when sharing an OpenGL context across multiple windows.
*
@@ -347,6 +360,62 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
+/*
+ * \brief A URL to a WinRT app's privacy policy
+ *
+ * All network-enabled WinRT apps must make a privacy policy available to its
+ * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
+ * be available in the Windows Settings charm, as accessed from within the app.
+ * SDL provides code to add a URL-based link there, which can point to the app's
+ * 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
+ * be a valid URL. For example, "http://www.example.com".
+ *
+ * The default value is "", which will prevent SDL from adding a privacy policy
+ * link to the Settings charm. This hint should only be set during app init.
+ *
+ * The label text of an app's "Privacy Policy" link may be customized via another
+ * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
+ *
+ * Please note that on Windows Phone, Microsoft does not provide standard UI
+ * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
+ * will not get used on that platform. Network-enabled phone apps should display
+ * their privacy policy through some other, in-app means.
+ */
+#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
+
+/** \brief Label text for a WinRT app's privacy policy link
+ *
+ * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
+ * Microsoft mandates that this policy be available via the Windows Settings charm.
+ * SDL provides code to add a link there, with it's label text being set via the
+ * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
+ *
+ * Please note that a privacy policy's contents are not set via this hint. A separate
+ * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
+ * policy.
+ *
+ * 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.
+ *
+ * For additional information on linking to a privacy policy, see the documentation for
+ * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
+ */
+#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
+
+/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
+ *
+ * TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
+ * For now, more details on why this is needed can be found at the
+ * beginning of the following web page:
+ * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
+ */
+#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
+
/**
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
*
diff --git a/SP/code/SDL2/include/SDL_main.h b/SP/code/SDL2/include/SDL_main.h
index 1f2bad3..2e8fae9 100644
--- a/SP/code/SDL2/include/SDL_main.h
+++ b/SP/code/SDL2/include/SDL_main.h
@@ -39,6 +39,18 @@
*/
#define SDL_MAIN_AVAILABLE
+#elif defined(__WINRT__)
+/* On WinRT, SDL provides a main function that initializes CoreApplication,
+ creating an instance of IFrameworkView in the process.
+
+ Please note that #include'ing SDL_main.h is not enough to get a main()
+ function working. In non-XAML apps, the file,
+ src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
+ into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
+ called, with a pointer to the Direct3D-hosted XAML control passed in.
+*/
+#define SDL_MAIN_NEEDED
+
#elif defined(__IPHONEOS__)
/* On iOS SDL provides a main function that creates an application delegate
and starts the iOS application run loop.
@@ -115,6 +127,24 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#endif /* __WIN32__ */
+#ifdef __WINRT__
+
+/**
+ * \brief Initializes and launches an SDL/WinRT application.
+ *
+ * \param mainFunction The SDL app's C-style main().
+ * \param xamlBackgroundPanel An optional, XAML-based, background panel.
+ * For Non-XAML apps, this value must be set to NULL. For XAML apps,
+ * pass in a pointer to a SwapChainBackgroundPanel, casted to an
+ * IInspectable (via reinterpret_cast).
+ * \ret 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
+ * information on the failure.
+ */
+extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel);
+
+#endif /* __WINRT__ */
+
+
#ifdef __cplusplus
}
#endif
diff --git a/SP/code/SDL2/include/SDL_name.h b/SP/code/SDL2/include/SDL_name.h
index d0469e1..719666f 100644
--- a/SP/code/SDL2/include/SDL_name.h
+++ b/SP/code/SDL2/include/SDL_name.h
@@ -1,3 +1,23 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2014 Sam Lantinga <slouken at libsdl.org>
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+*/
#ifndef _SDLname_h_
#define _SDLname_h_
@@ -9,3 +29,5 @@
#define SDL_NAME(X) SDL_##X
#endif /* _SDLname_h_ */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/SP/code/SDL2/include/SDL_platform.h b/SP/code/SDL2/include/SDL_platform.h
index afe3389..68b02a1 100644
--- a/SP/code/SDL2/include/SDL_platform.h
+++ b/SP/code/SDL2/include/SDL_platform.h
@@ -113,10 +113,26 @@
#undef __SOLARIS__
#define __SOLARIS__ 1
#endif
+
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
+/* Try to find out if we're compiling for WinRT or non-WinRT */
+/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
+#if defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_ /* _MSC_VER==1700 for MSVC 2012 */
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#undef __WINDOWS__
#define __WINDOWS__ 1
+/* See if we're compiling for WinRT: */
+#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+#undef __WINRT__
+#define __WINRT__ 1
#endif
+#else
+#undef __WINDOWS__
+#define __WINDOWS__ 1
+#endif /* _MSC_VER < 1700 */
+#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
+
#if defined(__WINDOWS__)
#undef __WIN32__
#define __WIN32__ 1
diff --git a/SP/code/SDL2/include/SDL_revision.h b/SP/code/SDL2/include/SDL_revision.h
index 06ef668..a75dc33 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-8297:be2102f000d0"
-#define SDL_REVISION_NUMBER 8297
+#define SDL_REVISION "hg-8628:b558f99d48f0"
+#define SDL_REVISION_NUMBER 8628
diff --git a/SP/code/SDL2/include/SDL_stdinc.h b/SP/code/SDL2/include/SDL_stdinc.h
index 6de724e..31b343d 100644
--- a/SP/code/SDL2/include/SDL_stdinc.h
+++ b/SP/code/SDL2/include/SDL_stdinc.h
@@ -71,8 +71,18 @@
# include <ctype.h>
#endif
#ifdef HAVE_MATH_H
+# if defined(__WINRT__)
+/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
+ WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
+ for more information.
+*/
+# define _USE_MATH_DEFINES
+# endif
# include <math.h>
#endif
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
# include <iconv.h>
#endif
diff --git a/SP/code/SDL2/include/SDL_system.h b/SP/code/SDL2/include/SDL_system.h
index 99ef822..fd929f7 100644
--- a/SP/code/SDL2/include/SDL_system.h
+++ b/SP/code/SDL2/include/SDL_system.h
@@ -116,6 +116,70 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
#endif /* __ANDROID__ */
+/* Platform specific functions for WinRT */
+#if defined(__WINRT__) && __WINRT__
+
+/**
+ * \brief WinRT / Windows Phone path types
+ */
+typedef enum
+{
+ /** \brief The installed app's root directory.
+ Files here are likely to be read-only. */
+ SDL_WINRT_PATH_INSTALLED_LOCATION,
+
+ /** \brief The app's local data store. Files may be written here */
+ SDL_WINRT_PATH_LOCAL_FOLDER,
+
+ /** \brief The app's roaming data store. Unsupported on Windows Phone.
+ Files written here may be copied to other machines via a network
+ connection.
+ */
+ SDL_WINRT_PATH_ROAMING_FOLDER,
+
+ /** \brief The app's temporary data store. Unsupported on Windows Phone.
+ Files written here may be deleted at any time. */
+ SDL_WINRT_PATH_TEMP_FOLDER
+} SDL_WinRT_Path;
+
+
+/**
+ * \brief Retrieves a WinRT defined path on the local file system
+ *
+ * \note Documentation on most app-specific path types on WinRT
+ * can be found on MSDN, at the URL:
+ * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
+ *
+ * \param pathType The type of path to retrieve.
+ * \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
+ * if the path is not available for any reason. Not all paths are
+ * available on all versions of Windows. This is especially true on
+ * Windows Phone. Check the documentation for the given
+ * SDL_WinRT_Path for more information on which path types are
+ * supported where.
+ */
+extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
+
+/**
+ * \brief Retrieves a WinRT defined path on the local file system
+ *
+ * \note Documentation on most app-specific path types on WinRT
+ * can be found on MSDN, at the URL:
+ * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
+ *
+ * \param pathType The type of path to retrieve.
+ * \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
+ * if the path is not available for any reason. Not all paths are
+ * available on all versions of Windows. This is especially true on
+ * Windows Phone. Check the documentation for the given
+ * SDL_WinRT_Path for more information on which path types are
+ * supported where.
+ */
+extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
+
+#endif /* __WINRT__ */
+
+
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
diff --git a/SP/code/SDL2/include/SDL_syswm.h b/SP/code/SDL2/include/SDL_syswm.h
index 40e8ca7..a3fe738 100644
--- a/SP/code/SDL2/include/SDL_syswm.h
+++ b/SP/code/SDL2/include/SDL_syswm.h
@@ -56,6 +56,10 @@ struct SDL_SysWMinfo;
#include <windows.h>
#endif
+#if defined(SDL_VIDEO_DRIVER_WINRT)
+#include <Inspectable.h>
+#endif
+
/* This is the structure for custom window manager events */
#if defined(SDL_VIDEO_DRIVER_X11)
#if defined(__APPLE__) && defined(__MACH__)
@@ -90,6 +94,7 @@ typedef struct _NSWindow NSWindow;
#include <UIKit/UIKit.h>
#else
typedef struct _UIWindow UIWindow;
+typedef struct _UIViewController UIViewController;
#endif
#endif
@@ -111,6 +116,7 @@ typedef enum
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
+ SDL_SYSWM_WINRT,
} SDL_SYSWM_TYPE;
/**
@@ -175,6 +181,12 @@ struct SDL_SysWMinfo
HWND window; /**< The window handle */
} win;
#endif
+#if defined(SDL_VIDEO_DRIVER_WINRT)
+ struct
+ {
+ IInspectable * window; /**< The WinRT CoreWindow */
+ } winrt;
+#endif
#if defined(SDL_VIDEO_DRIVER_X11)
struct
{
diff --git a/SP/code/SDL2/include/SDL_version.h b/SP/code/SDL2/include/SDL_version.h
index 22e0f5e..d02898b 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 2
+#define SDL_PATCHLEVEL 3
/**
* \brief Macro to determine SDL version program was compiled against.
diff --git a/SP/code/SDL2/include/begin_code.h b/SP/code/SDL2/include/begin_code.h
index fbed7d4..f37ee36 100644
--- a/SP/code/SDL2/include/begin_code.h
+++ b/SP/code/SDL2/include/begin_code.h
@@ -43,7 +43,7 @@
/* Some compilers use a special export keyword */
#ifndef DECLSPEC
-# if defined(__WIN32__)
+# if defined(__WIN32__) || defined(__WINRT__)
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
@@ -66,7 +66,7 @@
/* By default SDL uses the C calling convention */
#ifndef SDLCALL
-#if defined(__WIN32__) && !defined(__GNUC__)
+#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
#define SDLCALL __cdecl
#else
#define SDLCALL
diff --git a/SP/code/libs/macosx/libSDL2-2.0.0.dylib b/SP/code/libs/macosx/libSDL2-2.0.0.dylib
index 8e16981..1fe3655 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 f04a424..e4b36f1 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 41108f2..b4397f6 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.a b/SP/code/libs/win32/libSDL2.a
index 43c0455..d1b5f45 100644
Binary files a/SP/code/libs/win32/libSDL2.a and b/SP/code/libs/win32/libSDL2.a differ
diff --git a/SP/code/libs/win32/libSDL2.dll.a b/SP/code/libs/win32/libSDL2.dll.a
index 7e1f3eb..d2a593b 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 7419a7d..1c85e5a 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 d79caa8..1da50b9 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.a b/SP/code/libs/win64/libSDL264.a
index 05b86da..3fed695 100644
Binary files a/SP/code/libs/win64/libSDL264.a and b/SP/code/libs/win64/libSDL264.a differ
diff --git a/SP/code/libs/win64/libSDL264.dll.a b/SP/code/libs/win64/libSDL264.dll.a
index 471c664..fd2ef7d 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 3f0338b..a4e59ff 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