From 2b48481879435a057cd81708828f7a95844e9c30 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 6 Dec 2015 18:42:30 -0500 Subject: [PATCH] WinRT: enabled the Win10-Store Cert Kit bug-workaround, for Windows 8.0 apps --- src/video/winrt/SDL_winrtvideo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp index 5a91f1260ae76..54e28a91a6466 100644 --- a/src/video/winrt/SDL_winrtvideo.cpp +++ b/src/video/winrt/SDL_winrtvideo.cpp @@ -330,12 +330,14 @@ WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterInd 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 @@ WINRT_AddDisplaysForAdapter (_THIS, IDXGIFactory2 * dxgiFactory2, int adapterInd return SDL_SetError("Failed to apply DXGI Display-detection workaround"); } } -#endif // SDL_WINRT_USE_APPLICATIONVIEW break; }