21 #include "../../SDL_internal.h" 23 #if SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED 26 #include "../../video/winrt/SDL_winrtvideo_cpp.h" 28 #include "../SDL_sysrender.h" 31 #include <windows.ui.core.h> 32 #include <windows.graphics.display.h> 34 #if WINAPI_FAMILY == WINAPI_FAMILY_APP 35 #include <windows.ui.xaml.media.dxinterop.h> 50 if ( ! renderer->
window ) {
68 ABI::Windows::UI::Core::ICoreWindow *coreWindow =
NULL;
73 IUnknown *coreWindowAsIUnknown =
NULL;
74 coreWindow->QueryInterface(&coreWindowAsIUnknown);
75 coreWindow->Release();
77 return coreWindowAsIUnknown;
80 extern "C" DXGI_MODE_ROTATION
81 D3D11_GetCurrentRotation()
83 const DisplayOrientations currentOrientation = WINRT_DISPLAY_PROPERTY(CurrentOrientation);
85 switch (currentOrientation) {
87 #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP 89 case DisplayOrientations::Landscape:
90 return DXGI_MODE_ROTATION_ROTATE90;
91 case DisplayOrientations::Portrait:
92 return DXGI_MODE_ROTATION_IDENTITY;
93 case DisplayOrientations::LandscapeFlipped:
94 return DXGI_MODE_ROTATION_ROTATE270;
95 case DisplayOrientations::PortraitFlipped:
96 return DXGI_MODE_ROTATION_ROTATE180;
99 case DisplayOrientations::Landscape:
100 return DXGI_MODE_ROTATION_IDENTITY;
101 case DisplayOrientations::Portrait:
102 return DXGI_MODE_ROTATION_ROTATE270;
103 case DisplayOrientations::LandscapeFlipped:
104 return DXGI_MODE_ROTATION_ROTATE180;
105 case DisplayOrientations::PortraitFlipped:
106 return DXGI_MODE_ROTATION_ROTATE90;
110 return DXGI_MODE_ROTATION_IDENTITY;
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
static SDL_Renderer * renderer
#define SDL_GetWindowWMInfo
The type used to identify a window.
union SDL_SysWMinfo::@18 info