Merged various WinRT build fixes

--HG--
rename : src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp => src/render/direct3d11/SDL_render_winrt.cpp
This commit is contained in:
David Ludwig 2014-03-12 12:12:20 -04:00
commit 468dbccb39
14 changed files with 212 additions and 221 deletions

View file

@ -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 <windows.ui.xaml.media.dxinterop.h>

View file

@ -28,17 +28,20 @@ extern "C" {
}
#include <windows.ui.core.h>
#include <windows.foundation.h>
#include <windows.graphics.display.h>
#if WINAPI_FAMILY == WINAPI_FAMILY_APP
#include <windows.ui.xaml.media.dxinterop.h>
#endif
using namespace ABI;
using namespace Windows::UI::Core;
using namespace Windows::Graphics::Display;
#include <DXGI.h>
#include "SDL_render_winrt.h"
extern "C" void *
D3D11_GetCoreWindowFromSDLRenderer(SDL_Renderer * renderer)
@ -77,32 +80,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;
}