WinRT: build fix for Windows Phone 8.0
authorDavid Ludwig <dludwig@pobox.com>
Sun, 06 Dec 2015 18:48:46 -0500
changeset 995254b2eeb48c7d
parent 9951 839a45509496
child 9953 1e5e6474bfee
WinRT: build fix for Windows Phone 8.0
src/video/winrt/SDL_winrtvideo.cpp
     1.1 --- a/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 06 18:42:30 2015 -0500
     1.2 +++ b/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 06 18:48:46 2015 -0500
     1.3 @@ -333,11 +333,10 @@
     1.4              if (adapterIndex == 0 && outputIndex == 0) {
     1.5                  SDL_VideoDisplay display;
     1.6                  SDL_DisplayMode mode;
     1.7 -#if (NTDDI_VERSION >= NTDDI_WIN10) || (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
     1.8 +#if SDL_WINRT_USE_APPLICATIONVIEW
     1.9                  ApplicationView ^ appView = ApplicationView::GetForCurrentView();
    1.10 -#else
    1.11 +#endif
    1.12                  CoreWindow ^ coreWin = CoreWindow::GetForCurrentThread();
    1.13 -#endif
    1.14                  SDL_zero(display);
    1.15                  SDL_zero(mode);
    1.16                  display.name = "DXGI Display-detection Workaround";
    1.17 @@ -349,7 +348,7 @@
    1.18                     failing test), whereas CoreWindow might not.  -- DavidL
    1.19                  */
    1.20  
    1.21 -#if (NTDDI_VERSION >= NTDDI_WIN10) || (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
    1.22 +#if (NTDDI_VERSION >= NTDDI_WIN10) || (SDL_WINRT_USE_APPLICATIONVIEW && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
    1.23                  mode.w = WINRT_DIPS_TO_PHYSICAL_PIXELS(appView->VisibleBounds.Width);
    1.24                  mode.h = WINRT_DIPS_TO_PHYSICAL_PIXELS(appView->VisibleBounds.Height);
    1.25  #else