From 027d63bc013fbbc41cb2569c6d19a7dbcfb6da72 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 31 Dec 2017 03:36:54 -0500 Subject: [PATCH] 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/winrt/SDL_winrtapp_common.cpp b/src/core/winrt/SDL_winrtapp_common.cpp index fda00af62..e09a6c505 100644 --- a/src/core/winrt/SDL_winrtapp_common.cpp +++ b/src/core/winrt/SDL_winrtapp_common.cpp @@ -45,6 +45,7 @@ SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel) extern "C" DECLSPEC SDL_WinRT_DeviceFamily SDL_WinRTGetDeviceFamily() { +#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. */ Platform::String^ deviceFamily = Windows::System::Profile::AnalyticsInfo::VersionInfo->DeviceFamily; if (deviceFamily->Equals("Windows.Desktop")) @@ -59,6 +60,7 @@ SDL_WinRTGetDeviceFamily() { return SDL_WINRT_DEVICEFAMILY_XBOX; } +#endif return SDL_WINRT_DEVICEFAMILY_UNKNOWN; } \ No newline at end of file