WinRT: build fix for Windows Phone 8.0
authorDavid Ludwig <dludwig@pobox.com>
Sun, 06 Dec 2015 18:48:46 -0500
changeset 9952 54b2eeb48c7d
parent 9951 839a45509496
child 9953 1e5e6474bfee
WinRT: build fix for Windows Phone 8.0
src/video/winrt/SDL_winrtvideo.cpp
--- a/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 06 18:42:30 2015 -0500
+++ b/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 06 18:48:46 2015 -0500
@@ -333,11 +333,10 @@
             if (adapterIndex == 0 && outputIndex == 0) {
                 SDL_VideoDisplay display;
                 SDL_DisplayMode mode;
-#if (NTDDI_VERSION >= NTDDI_WIN10) || (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+#if SDL_WINRT_USE_APPLICATIONVIEW
                 ApplicationView ^ appView = ApplicationView::GetForCurrentView();
-#else
+#endif
                 CoreWindow ^ coreWin = CoreWindow::GetForCurrentThread();
-#endif
                 SDL_zero(display);
                 SDL_zero(mode);
                 display.name = "DXGI Display-detection Workaround";
@@ -349,7 +348,7 @@
                    failing test), whereas CoreWindow might not.  -- DavidL
                 */
 
-#if (NTDDI_VERSION >= NTDDI_WIN10) || (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+#if (NTDDI_VERSION >= NTDDI_WIN10) || (SDL_WINRT_USE_APPLICATIONVIEW && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
                 mode.w = WINRT_DIPS_TO_PHYSICAL_PIXELS(appView->VisibleBounds.Width);
                 mode.h = WINRT_DIPS_TO_PHYSICAL_PIXELS(appView->VisibleBounds.Height);
 #else