Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
winrt: workaround for pre-UWP builds.
There's probably a better way to do this for legacy platforms, though.
  • Loading branch information
icculus committed Dec 31, 2017
1 parent 140cc46 commit 027d63b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/winrt/SDL_winrtapp_common.cpp
Expand Up @@ -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"))
Expand All @@ -59,6 +60,7 @@ SDL_WinRTGetDeviceFamily()
{
return SDL_WINRT_DEVICEFAMILY_XBOX;
}
#endif

return SDL_WINRT_DEVICEFAMILY_UNKNOWN;
}

0 comments on commit 027d63b

Please sign in to comment.