1.1 --- a/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj Mon Sep 02 15:29:46 2013 -0400
1.2 +++ b/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj Wed Sep 04 19:55:45 2013 -0400
1.3 @@ -150,7 +150,7 @@
1.4 <ClInclude Include="..\..\include\SDL_clipboard.h" />
1.5 <ClInclude Include="..\..\include\SDL_config.h" />
1.6 <ClInclude Include="..\..\include\SDL_config_minimal.h" />
1.7 - <ClInclude Include="..\..\include\SDL_config_windowsrt.h" />
1.8 + <ClInclude Include="..\..\include\SDL_config_winrt.h" />
1.9 <ClInclude Include="..\..\include\SDL_copying.h" />
1.10 <ClInclude Include="..\..\include\SDL_cpuinfo.h" />
1.11 <ClInclude Include="..\..\include\SDL_endian.h" />
2.1 --- a/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters Mon Sep 02 15:29:46 2013 -0400
2.2 +++ b/VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters Wed Sep 04 19:55:45 2013 -0400
2.3 @@ -42,9 +42,6 @@
2.4 <ClInclude Include="..\..\include\SDL_config_minimal.h">
2.5 <Filter>Header Files</Filter>
2.6 </ClInclude>
2.7 - <ClInclude Include="..\..\include\SDL_config_windowsrt.h">
2.8 - <Filter>Header Files</Filter>
2.9 - </ClInclude>
2.10 <ClInclude Include="..\..\include\SDL_copying.h">
2.11 <Filter>Header Files</Filter>
2.12 </ClInclude>
2.13 @@ -339,6 +336,9 @@
2.14 <ClInclude Include="..\..\src\video\winrt\SDL_winrtmouse_c.h">
2.15 <Filter>Source Files</Filter>
2.16 </ClInclude>
2.17 + <ClInclude Include="..\..\include\SDL_config_winrt.h">
2.18 + <Filter>Header Files</Filter>
2.19 + </ClInclude>
2.20 </ItemGroup>
2.21 <ItemGroup>
2.22 <ClCompile Include="..\..\src\atomic\SDL_atomic.c">
3.1 --- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj Mon Sep 02 15:29:46 2013 -0400
3.2 +++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj Wed Sep 04 19:55:45 2013 -0400
3.3 @@ -204,7 +204,7 @@
3.4 <ClInclude Include="..\..\include\SDL_clipboard.h" />
3.5 <ClInclude Include="..\..\include\SDL_config.h" />
3.6 <ClInclude Include="..\..\include\SDL_config_minimal.h" />
3.7 - <ClInclude Include="..\..\include\SDL_config_windowsrt.h" />
3.8 + <ClInclude Include="..\..\include\SDL_config_winrt.h" />
3.9 <ClInclude Include="..\..\include\SDL_copying.h" />
3.10 <ClInclude Include="..\..\include\SDL_cpuinfo.h" />
3.11 <ClInclude Include="..\..\include\SDL_endian.h" />
4.1 --- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters Mon Sep 02 15:29:46 2013 -0400
4.2 +++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters Wed Sep 04 19:55:45 2013 -0400
4.3 @@ -410,9 +410,6 @@
4.4 <ClInclude Include="..\..\include\SDL_config_minimal.h">
4.5 <Filter>Header Files</Filter>
4.6 </ClInclude>
4.7 - <ClInclude Include="..\..\include\SDL_config_windowsrt.h">
4.8 - <Filter>Header Files</Filter>
4.9 - </ClInclude>
4.10 <ClInclude Include="..\..\include\SDL_copying.h">
4.11 <Filter>Header Files</Filter>
4.12 </ClInclude>
4.13 @@ -608,6 +605,9 @@
4.14 <ClInclude Include="..\..\src\video\winrt\SDL_winrtmouse_c.h">
4.15 <Filter>Source Files</Filter>
4.16 </ClInclude>
4.17 + <ClInclude Include="..\..\include\SDL_config_winrt.h">
4.18 + <Filter>Header Files</Filter>
4.19 + </ClInclude>
4.20 </ItemGroup>
4.21 <ItemGroup>
4.22 <Filter Include="Header Files">
5.1 --- a/include/SDL_config.h Mon Sep 02 15:29:46 2013 -0400
5.2 +++ b/include/SDL_config.h Wed Sep 04 19:55:45 2013 -0400
5.3 @@ -32,7 +32,7 @@
5.4 #if defined(__WIN32__)
5.5 #include "SDL_config_windows.h"
5.6 #elif defined(__WINRT__)
5.7 -#include "SDL_config_windowsrt.h"
5.8 +#include "SDL_config_winrt.h"
5.9 #elif defined(__MACOSX__)
5.10 #include "SDL_config_macosx.h"
5.11 #elif defined(__IPHONEOS__)
6.1 --- a/include/SDL_config_windowsrt.h Mon Sep 02 15:29:46 2013 -0400
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,182 +0,0 @@
6.4 -/*
6.5 - Simple DirectMedia Layer
6.6 - Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
6.7 -
6.8 - This software is provided 'as-is', without any express or implied
6.9 - warranty. In no event will the authors be held liable for any damages
6.10 - arising from the use of this software.
6.11 -
6.12 - Permission is granted to anyone to use this software for any purpose,
6.13 - including commercial applications, and to alter it and redistribute it
6.14 - freely, subject to the following restrictions:
6.15 -
6.16 - 1. The origin of this software must not be misrepresented; you must not
6.17 - claim that you wrote the original software. If you use this software
6.18 - in a product, an acknowledgment in the product documentation would be
6.19 - appreciated but is not required.
6.20 - 2. Altered source versions must be plainly marked as such, and must not be
6.21 - misrepresented as being the original software.
6.22 - 3. This notice may not be removed or altered from any source distribution.
6.23 -*/
6.24 -
6.25 -#ifndef _SDL_config_windows_h
6.26 -#define _SDL_config_windows_h
6.27 -
6.28 -#include "SDL_platform.h"
6.29 -
6.30 -/* This is a set of defines to configure the SDL features */
6.31 -
6.32 -#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
6.33 -#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
6.34 -#define HAVE_STDINT_H 1
6.35 -#elif defined(_MSC_VER)
6.36 -typedef signed __int8 int8_t;
6.37 -typedef unsigned __int8 uint8_t;
6.38 -typedef signed __int16 int16_t;
6.39 -typedef unsigned __int16 uint16_t;
6.40 -typedef signed __int32 int32_t;
6.41 -typedef unsigned __int32 uint32_t;
6.42 -typedef signed __int64 int64_t;
6.43 -typedef unsigned __int64 uint64_t;
6.44 -#ifndef _UINTPTR_T_DEFINED
6.45 -#ifdef _WIN64
6.46 -typedef unsigned __int64 uintptr_t;
6.47 -#else
6.48 -typedef unsigned int uintptr_t;
6.49 -#endif
6.50 -#define _UINTPTR_T_DEFINED
6.51 -#endif
6.52 -/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
6.53 -#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
6.54 -#define DWORD_PTR DWORD
6.55 -#endif
6.56 -#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
6.57 -#define LONG_PTR LONG
6.58 -#endif
6.59 -#else /* !__GNUC__ && !_MSC_VER */
6.60 -typedef signed char int8_t;
6.61 -typedef unsigned char uint8_t;
6.62 -typedef signed short int16_t;
6.63 -typedef unsigned short uint16_t;
6.64 -typedef signed int int32_t;
6.65 -typedef unsigned int uint32_t;
6.66 -typedef signed long long int64_t;
6.67 -typedef unsigned long long uint64_t;
6.68 -#ifndef _SIZE_T_DEFINED_
6.69 -#define _SIZE_T_DEFINED_
6.70 -typedef unsigned int size_t;
6.71 -#endif
6.72 -typedef unsigned int uintptr_t;
6.73 -#endif /* __GNUC__ || _MSC_VER */
6.74 -#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
6.75 -
6.76 -#ifdef _WIN64
6.77 -# define SIZEOF_VOIDP 8
6.78 -#else
6.79 -# define SIZEOF_VOIDP 4
6.80 -#endif
6.81 -
6.82 -/* Useful headers */
6.83 -#define HAVE_LIBC 1
6.84 -#define HAVE_STDIO_H 1
6.85 -#define STDC_HEADERS 1
6.86 -#define HAVE_STRING_H 1
6.87 -#define HAVE_CTYPE_H 1
6.88 -#define HAVE_MATH_H 1
6.89 -#define HAVE_FLOAT_H 1
6.90 -#define HAVE_SIGNAL_H 1
6.91 -
6.92 -/* C library functions */
6.93 -#define HAVE_MALLOC 1
6.94 -#define HAVE_CALLOC 1
6.95 -#define HAVE_REALLOC 1
6.96 -#define HAVE_FREE 1
6.97 -#define HAVE_ALLOCA 1
6.98 -#define HAVE_QSORT 1
6.99 -#define HAVE_ABS 1
6.100 -#define HAVE_MEMSET 1
6.101 -#define HAVE_MEMCPY 1
6.102 -#define HAVE_MEMMOVE 1
6.103 -#define HAVE_MEMCMP 1
6.104 -#define HAVE_STRLEN 1
6.105 -#define HAVE__STRREV 1
6.106 -#define HAVE__STRUPR 1
6.107 -//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
6.108 -#define HAVE_STRCHR 1
6.109 -#define HAVE_STRRCHR 1
6.110 -#define HAVE_STRSTR 1
6.111 -//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
6.112 -//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
6.113 -//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
6.114 -#define HAVE_STRTOL 1
6.115 -#define HAVE_STRTOUL 1
6.116 -//#define HAVE_STRTOLL 1
6.117 -#define HAVE_STRTOD 1
6.118 -#define HAVE_ATOI 1
6.119 -#define HAVE_ATOF 1
6.120 -#define HAVE_STRCMP 1
6.121 -#define HAVE_STRNCMP 1
6.122 -#define HAVE__STRICMP 1
6.123 -#define HAVE__STRNICMP 1
6.124 -#define HAVE_VSNPRINTF 1
6.125 -//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
6.126 -#define HAVE_M_PI 1
6.127 -#define HAVE_ATAN 1
6.128 -#define HAVE_ATAN2 1
6.129 -#define HAVE_CEIL 1
6.130 -#define HAVE__COPYSIGN 1
6.131 -#define HAVE_COS 1
6.132 -#define HAVE_COSF 1
6.133 -#define HAVE_FABS 1
6.134 -#define HAVE_FLOOR 1
6.135 -#define HAVE_LOG 1
6.136 -#define HAVE_POW 1
6.137 -//#define HAVE_SCALBN 1
6.138 -#define HAVE__SCALB 1
6.139 -#define HAVE_SIN 1
6.140 -#define HAVE_SINF 1
6.141 -#define HAVE_SQRT 1
6.142 -#define HAVE__FSEEKI64 1
6.143 -
6.144 -/* Enable various audio drivers */
6.145 -#define SDL_AUDIO_DRIVER_XAUDIO2 1
6.146 -#define SDL_AUDIO_DRIVER_DISK 1
6.147 -#define SDL_AUDIO_DRIVER_DUMMY 1
6.148 -
6.149 -/* Enable various input drivers */
6.150 -// TODO, WinRT: Get haptic support working
6.151 -#define SDL_HAPTIC_DISABLED 1
6.152 -
6.153 -#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
6.154 -#define SDL_JOYSTICK_DISABLED 1
6.155 -#else
6.156 -#define SDL_JOYSTICK_XINPUT 1
6.157 -#endif
6.158 -
6.159 -/* Enable various shared object loading systems */
6.160 -#define SDL_LOADSO_WINDOWS 1
6.161 -
6.162 -/* Enable various threading systems */
6.163 -#define SDL_THREAD_STDCPP 1
6.164 -
6.165 -/* Enable various timer systems */
6.166 -#define SDL_TIMER_WINDOWS 1
6.167 -
6.168 -/* Enable various video drivers */
6.169 -#define SDL_VIDEO_DRIVER_WINRT 1
6.170 -#define SDL_VIDEO_DRIVER_DUMMY 1
6.171 -
6.172 -// TODO, WinRT: Get a Direct3D 11 based renderer working in SDL.
6.173 -/* Enable appropriate renderer(s) */
6.174 -#define SDL_VIDEO_RENDER_D3D11 1
6.175 -
6.176 -/* Enable system power support */
6.177 -// TODO, WinRT: investigate system power support. The Win32-based APIs don't work on WinRT.
6.178 -#define SDL_POWER_DISABLED 1
6.179 -
6.180 -/* Enable assembly routines (Win64 doesn't have inline asm) */
6.181 -#ifndef _WIN64
6.182 -#define SDL_ASSEMBLY_ROUTINES 1
6.183 -#endif
6.184 -
6.185 -#endif /* _SDL_config_windows_h */
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/include/SDL_config_winrt.h Wed Sep 04 19:55:45 2013 -0400
7.3 @@ -0,0 +1,182 @@
7.4 +/*
7.5 + Simple DirectMedia Layer
7.6 + Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
7.7 +
7.8 + This software is provided 'as-is', without any express or implied
7.9 + warranty. In no event will the authors be held liable for any damages
7.10 + arising from the use of this software.
7.11 +
7.12 + Permission is granted to anyone to use this software for any purpose,
7.13 + including commercial applications, and to alter it and redistribute it
7.14 + freely, subject to the following restrictions:
7.15 +
7.16 + 1. The origin of this software must not be misrepresented; you must not
7.17 + claim that you wrote the original software. If you use this software
7.18 + in a product, an acknowledgment in the product documentation would be
7.19 + appreciated but is not required.
7.20 + 2. Altered source versions must be plainly marked as such, and must not be
7.21 + misrepresented as being the original software.
7.22 + 3. This notice may not be removed or altered from any source distribution.
7.23 +*/
7.24 +
7.25 +#ifndef _SDL_config_windows_h
7.26 +#define _SDL_config_windows_h
7.27 +
7.28 +#include "SDL_platform.h"
7.29 +
7.30 +/* This is a set of defines to configure the SDL features */
7.31 +
7.32 +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
7.33 +#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
7.34 +#define HAVE_STDINT_H 1
7.35 +#elif defined(_MSC_VER)
7.36 +typedef signed __int8 int8_t;
7.37 +typedef unsigned __int8 uint8_t;
7.38 +typedef signed __int16 int16_t;
7.39 +typedef unsigned __int16 uint16_t;
7.40 +typedef signed __int32 int32_t;
7.41 +typedef unsigned __int32 uint32_t;
7.42 +typedef signed __int64 int64_t;
7.43 +typedef unsigned __int64 uint64_t;
7.44 +#ifndef _UINTPTR_T_DEFINED
7.45 +#ifdef _WIN64
7.46 +typedef unsigned __int64 uintptr_t;
7.47 +#else
7.48 +typedef unsigned int uintptr_t;
7.49 +#endif
7.50 +#define _UINTPTR_T_DEFINED
7.51 +#endif
7.52 +/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
7.53 +#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
7.54 +#define DWORD_PTR DWORD
7.55 +#endif
7.56 +#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
7.57 +#define LONG_PTR LONG
7.58 +#endif
7.59 +#else /* !__GNUC__ && !_MSC_VER */
7.60 +typedef signed char int8_t;
7.61 +typedef unsigned char uint8_t;
7.62 +typedef signed short int16_t;
7.63 +typedef unsigned short uint16_t;
7.64 +typedef signed int int32_t;
7.65 +typedef unsigned int uint32_t;
7.66 +typedef signed long long int64_t;
7.67 +typedef unsigned long long uint64_t;
7.68 +#ifndef _SIZE_T_DEFINED_
7.69 +#define _SIZE_T_DEFINED_
7.70 +typedef unsigned int size_t;
7.71 +#endif
7.72 +typedef unsigned int uintptr_t;
7.73 +#endif /* __GNUC__ || _MSC_VER */
7.74 +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
7.75 +
7.76 +#ifdef _WIN64
7.77 +# define SIZEOF_VOIDP 8
7.78 +#else
7.79 +# define SIZEOF_VOIDP 4
7.80 +#endif
7.81 +
7.82 +/* Useful headers */
7.83 +#define HAVE_LIBC 1
7.84 +#define HAVE_STDIO_H 1
7.85 +#define STDC_HEADERS 1
7.86 +#define HAVE_STRING_H 1
7.87 +#define HAVE_CTYPE_H 1
7.88 +#define HAVE_MATH_H 1
7.89 +#define HAVE_FLOAT_H 1
7.90 +#define HAVE_SIGNAL_H 1
7.91 +
7.92 +/* C library functions */
7.93 +#define HAVE_MALLOC 1
7.94 +#define HAVE_CALLOC 1
7.95 +#define HAVE_REALLOC 1
7.96 +#define HAVE_FREE 1
7.97 +#define HAVE_ALLOCA 1
7.98 +#define HAVE_QSORT 1
7.99 +#define HAVE_ABS 1
7.100 +#define HAVE_MEMSET 1
7.101 +#define HAVE_MEMCPY 1
7.102 +#define HAVE_MEMMOVE 1
7.103 +#define HAVE_MEMCMP 1
7.104 +#define HAVE_STRLEN 1
7.105 +#define HAVE__STRREV 1
7.106 +#define HAVE__STRUPR 1
7.107 +//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
7.108 +#define HAVE_STRCHR 1
7.109 +#define HAVE_STRRCHR 1
7.110 +#define HAVE_STRSTR 1
7.111 +//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
7.112 +//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
7.113 +//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
7.114 +#define HAVE_STRTOL 1
7.115 +#define HAVE_STRTOUL 1
7.116 +//#define HAVE_STRTOLL 1
7.117 +#define HAVE_STRTOD 1
7.118 +#define HAVE_ATOI 1
7.119 +#define HAVE_ATOF 1
7.120 +#define HAVE_STRCMP 1
7.121 +#define HAVE_STRNCMP 1
7.122 +#define HAVE__STRICMP 1
7.123 +#define HAVE__STRNICMP 1
7.124 +#define HAVE_VSNPRINTF 1
7.125 +//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
7.126 +#define HAVE_M_PI 1
7.127 +#define HAVE_ATAN 1
7.128 +#define HAVE_ATAN2 1
7.129 +#define HAVE_CEIL 1
7.130 +#define HAVE__COPYSIGN 1
7.131 +#define HAVE_COS 1
7.132 +#define HAVE_COSF 1
7.133 +#define HAVE_FABS 1
7.134 +#define HAVE_FLOOR 1
7.135 +#define HAVE_LOG 1
7.136 +#define HAVE_POW 1
7.137 +//#define HAVE_SCALBN 1
7.138 +#define HAVE__SCALB 1
7.139 +#define HAVE_SIN 1
7.140 +#define HAVE_SINF 1
7.141 +#define HAVE_SQRT 1
7.142 +#define HAVE__FSEEKI64 1
7.143 +
7.144 +/* Enable various audio drivers */
7.145 +#define SDL_AUDIO_DRIVER_XAUDIO2 1
7.146 +#define SDL_AUDIO_DRIVER_DISK 1
7.147 +#define SDL_AUDIO_DRIVER_DUMMY 1
7.148 +
7.149 +/* Enable various input drivers */
7.150 +// TODO, WinRT: Get haptic support working
7.151 +#define SDL_HAPTIC_DISABLED 1
7.152 +
7.153 +#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
7.154 +#define SDL_JOYSTICK_DISABLED 1
7.155 +#else
7.156 +#define SDL_JOYSTICK_XINPUT 1
7.157 +#endif
7.158 +
7.159 +/* Enable various shared object loading systems */
7.160 +#define SDL_LOADSO_WINDOWS 1
7.161 +
7.162 +/* Enable various threading systems */
7.163 +#define SDL_THREAD_STDCPP 1
7.164 +
7.165 +/* Enable various timer systems */
7.166 +#define SDL_TIMER_WINDOWS 1
7.167 +
7.168 +/* Enable various video drivers */
7.169 +#define SDL_VIDEO_DRIVER_WINRT 1
7.170 +#define SDL_VIDEO_DRIVER_DUMMY 1
7.171 +
7.172 +// TODO, WinRT: Get a Direct3D 11 based renderer working in SDL.
7.173 +/* Enable appropriate renderer(s) */
7.174 +#define SDL_VIDEO_RENDER_D3D11 1
7.175 +
7.176 +/* Enable system power support */
7.177 +// TODO, WinRT: investigate system power support. The Win32-based APIs don't work on WinRT.
7.178 +#define SDL_POWER_DISABLED 1
7.179 +
7.180 +/* Enable assembly routines (Win64 doesn't have inline asm) */
7.181 +#ifndef _WIN64
7.182 +#define SDL_ASSEMBLY_ROUTINES 1
7.183 +#endif
7.184 +
7.185 +#endif /* _SDL_config_windows_h */
8.1 --- a/include/SDL_main.h Mon Sep 02 15:29:46 2013 -0400
8.2 +++ b/include/SDL_main.h Wed Sep 04 19:55:45 2013 -0400
8.3 @@ -44,7 +44,7 @@
8.4 creating an instance of IFrameworkView in the process.
8.5
8.6 Please note that #include'ing SDL_main.h is not enough to get a main()
8.7 - function working. The file, src/main/windowsrt/SDL_WinRT_main.cpp, or a copy
8.8 + function working. The file, src/main/winrt/SDL_WinRT_main.cpp, or a copy
8.9 of it, must be compiled into the app itself.
8.10 */
8.11 #define SDL_MAIN_NEEDED