winrt: workaround for pre-UWP builds.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 31 Dec 2017 03:36:54 -0500
changeset 11795ceab26a45523
parent 11794 c40f03dda342
child 11796 8f385b1fd0b6
winrt: workaround for pre-UWP builds.

There's probably a better way to do this for legacy platforms, though.
src/core/winrt/SDL_winrtapp_common.cpp
     1.1 --- a/src/core/winrt/SDL_winrtapp_common.cpp	Sun Dec 31 03:35:41 2017 -0500
     1.2 +++ b/src/core/winrt/SDL_winrtapp_common.cpp	Sun Dec 31 03:36:54 2017 -0500
     1.3 @@ -45,6 +45,7 @@
     1.4  extern "C" DECLSPEC SDL_WinRT_DeviceFamily
     1.5  SDL_WinRTGetDeviceFamily()
     1.6  {
     1.7 +#if NTDDI_VERSION >= NTDDI_WIN10  /* !!! FIXME: I have no idea if this is the right test. This is a UWP API, I think. Older windows should...just return "mobile"? I don't know. --ryan. */
     1.8      Platform::String^ deviceFamily = Windows::System::Profile::AnalyticsInfo::VersionInfo->DeviceFamily;
     1.9  
    1.10      if (deviceFamily->Equals("Windows.Desktop"))
    1.11 @@ -59,6 +60,7 @@
    1.12      {
    1.13          return SDL_WINRT_DEVICEFAMILY_XBOX;
    1.14      }
    1.15 +#endif
    1.16  
    1.17      return SDL_WINRT_DEVICEFAMILY_UNKNOWN;
    1.18  }
    1.19 \ No newline at end of file