diff --git a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
index cc5fddd7b..70553a471 100644
--- a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
+++ b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
@@ -97,16 +97,10 @@
-
- true
- true
- true
- true
- true
- true
-
+
+
@@ -285,10 +279,11 @@
-
+
+
diff --git a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
index fb3195f91..be690eb42 100644
--- a/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
+++ b/VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
@@ -280,9 +280,8 @@
Source Files
-
- Source Files
-
+
+
@@ -639,9 +638,8 @@
Source Files
-
- Source Files
-
+
+
diff --git a/src/core/winrt/SDL_winrtapp_xaml.cpp b/src/core/winrt/SDL_winrtapp_xaml.cpp
index 67a5cddea..5b129d142 100644
--- a/src/core/winrt/SDL_winrtapp_xaml.cpp
+++ b/src/core/winrt/SDL_winrtapp_xaml.cpp
@@ -42,6 +42,7 @@
SDL_bool WINRT_XAMLWasEnabled = SDL_FALSE;
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
+extern "C"
ISwapChainBackgroundPanelNative * WINRT_GlobalSwapChainBackgroundPanelNative = NULL;
static Windows::Foundation::EventRegistrationToken WINRT_XAMLAppEventToken;
#endif
diff --git a/src/joystick/winrt/SDL_xinputjoystick.c b/src/joystick/winrt/SDL_xinputjoystick.c
index 1bb91b272..649f7cbe9 100644
--- a/src/joystick/winrt/SDL_xinputjoystick.c
+++ b/src/joystick/winrt/SDL_xinputjoystick.c
@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
-#include "SDL_config.h"
+#include "../../SDL_internal.h"
#if SDL_JOYSTICK_XINPUT
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index 58673d465..e77775722 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -35,7 +35,7 @@
#ifdef __WINRT__
-#include "SDL_render_d3d11_winrthelpers_cpp.h"
+#include "SDL_render_winrt.h"
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#include
diff --git a/src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp b/src/render/direct3d11/SDL_render_winrt.cpp
similarity index 70%
rename from src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp
rename to src/render/direct3d11/SDL_render_winrt.cpp
index 25e6765e9..5753beb54 100644
--- a/src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp
+++ b/src/render/direct3d11/SDL_render_winrt.cpp
@@ -28,12 +28,15 @@ extern "C" {
}
#include
-#include
+#include
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#include
#endif
+#include "SDL_render_winrt.h"
+
+using namespace ABI;
using namespace Windows::UI::Core;
using namespace Windows::Graphics::Display;
@@ -75,32 +78,32 @@ D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer * renderer)
extern "C" DXGI_MODE_ROTATION
D3D11_GetCurrentRotation()
{
+#if 0 /* FIXME: This doesn't compile on Visual Studio 2013 */
switch (DisplayProperties::CurrentOrientation) {
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
- /* Windows Phone rotations */
- case DisplayOrientations::Landscape:
- return DXGI_MODE_ROTATION_ROTATE90;
- case DisplayOrientations::Portrait:
- return DXGI_MODE_ROTATION_IDENTITY;
- case DisplayOrientations::LandscapeFlipped:
- return DXGI_MODE_ROTATION_ROTATE270;
- case DisplayOrientations::PortraitFlipped:
- return DXGI_MODE_ROTATION_ROTATE180;
+ /* Windows Phone rotations */
+ case DisplayOrientations::Landscape:
+ return DXGI_MODE_ROTATION_ROTATE90;
+ case DisplayOrientations::Portrait:
+ return DXGI_MODE_ROTATION_IDENTITY;
+ case DisplayOrientations::LandscapeFlipped:
+ return DXGI_MODE_ROTATION_ROTATE270;
+ case DisplayOrientations::PortraitFlipped:
+ return DXGI_MODE_ROTATION_ROTATE180;
#else
- /* Non-Windows-Phone rotations (ex: Windows 8, Windows RT) */
- case DisplayOrientations::Landscape:
- return DXGI_MODE_ROTATION_IDENTITY;
- case DisplayOrientations::Portrait:
- return DXGI_MODE_ROTATION_ROTATE270;
- case DisplayOrientations::LandscapeFlipped:
- return DXGI_MODE_ROTATION_ROTATE180;
- case DisplayOrientations::PortraitFlipped:
- return DXGI_MODE_ROTATION_ROTATE90;
+ /* Non-Windows-Phone rotations (ex: Windows 8, Windows RT) */
+ case DisplayOrientations::Landscape:
+ return DXGI_MODE_ROTATION_IDENTITY;
+ case DisplayOrientations::Portrait:
+ return DXGI_MODE_ROTATION_ROTATE270;
+ case DisplayOrientations::LandscapeFlipped:
+ return DXGI_MODE_ROTATION_ROTATE180;
+ case DisplayOrientations::PortraitFlipped:
+ return DXGI_MODE_ROTATION_ROTATE90;
#endif /* WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP */
-
- default:
- return DXGI_MODE_ROTATION_UNSPECIFIED;
}
+#endif
+ return DXGI_MODE_ROTATION_IDENTITY;
}
diff --git a/src/render/direct3d11/SDL_render_d3d11_winrthelpers_cpp.h b/src/render/direct3d11/SDL_render_winrt.h
similarity index 100%
rename from src/render/direct3d11/SDL_render_d3d11_winrthelpers_cpp.h
rename to src/render/direct3d11/SDL_render_winrt.h
diff --git a/src/video/winrt/SDL_winrtevents.cpp b/src/video/winrt/SDL_winrtevents.cpp
index 112c3d494..c27c7084b 100644
--- a/src/video/winrt/SDL_winrtevents.cpp
+++ b/src/video/winrt/SDL_winrtevents.cpp
@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
-#include "SDL_config.h"
+#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_WINRT
diff --git a/src/video/winrt/SDL_winrtmouse.cpp b/src/video/winrt/SDL_winrtmouse.cpp
index e3cd284fd..fdfbcf94a 100644
--- a/src/video/winrt/SDL_winrtmouse.cpp
+++ b/src/video/winrt/SDL_winrtmouse.cpp
@@ -18,7 +18,6 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
-
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_WINRT
diff --git a/src/video/winrt/SDL_winrtopengles.cpp b/src/video/winrt/SDL_winrtopengles.cpp
index 1229eb9bf..b0bf37a33 100644
--- a/src/video/winrt/SDL_winrtopengles.cpp
+++ b/src/video/winrt/SDL_winrtopengles.cpp
@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
-#include "SDL_config.h"
+#include "../../SDL_internal.h"
// TODO: WinRT, make this file compile via C code
diff --git a/src/video/winrt/SDL_winrtpointerinput.cpp b/src/video/winrt/SDL_winrtpointerinput.cpp
index 13dd5b621..cf8dfd960 100644
--- a/src/video/winrt/SDL_winrtpointerinput.cpp
+++ b/src/video/winrt/SDL_winrtpointerinput.cpp
@@ -18,7 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
-#include "SDL_config.h"
+#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_WINRT