WinRT: enabled the Win10-Store Cert Kit bug-workaround, for Windows 8.0 apps
authorDavid Ludwig <dludwig@pobox.com>
Sun, 06 Dec 2015 18:42:30 -0500
changeset 9951 839a45509496
parent 9950 6cc7e0682758
child 9952 54b2eeb48c7d
WinRT: enabled the Win10-Store Cert Kit bug-workaround, for Windows 8.0 apps
src/video/winrt/SDL_winrtvideo.cpp
--- a/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 06 18:33:43 2015 -0500
+++ b/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 06 18:42:30 2015 -0500
@@ -330,12 +330,14 @@
                happens, and use a hackish means to create a reasonable-as-possible
                'display mode'.  -- DavidL
             */
-#if SDL_WINRT_USE_APPLICATIONVIEW
             if (adapterIndex == 0 && outputIndex == 0) {
                 SDL_VideoDisplay display;
                 SDL_DisplayMode mode;
+#if (NTDDI_VERSION >= NTDDI_WIN10) || (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
                 ApplicationView ^ appView = ApplicationView::GetForCurrentView();
+#else
                 CoreWindow ^ coreWin = CoreWindow::GetForCurrentThread();
+#endif
                 SDL_zero(display);
                 SDL_zero(mode);
                 display.name = "DXGI Display-detection Workaround";
@@ -368,7 +370,6 @@
                     return SDL_SetError("Failed to apply DXGI Display-detection workaround");
                 }
             }
-#endif  // SDL_WINRT_USE_APPLICATIONVIEW
 
             break;
         }