Skip to content

Commit

Permalink
Fixed a linker error when building SDL/WinRT
Browse files Browse the repository at this point in the history
The Win32 APIs, VerifyVersionInfoW and VerSetConditionMask, are not currently
available for use in WinRT apps.  This change primarily #if[n]defs-out some
calls to them.
  • Loading branch information
DavidLudwig committed Apr 29, 2014
1 parent 3669677 commit c10afa4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/windows/SDL_windows.c
Expand Up @@ -93,6 +93,7 @@ WIN_CoUninitialize(void)
#endif
}

#ifndef __WINRT__
static BOOL
IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
{
Expand All @@ -112,10 +113,15 @@ IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServiceP

return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE;
}
#endif

BOOL WIN_IsWindowsVistaOrGreater()
{
#ifdef __WINRT__
return TRUE;
#else
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0);
#endif
}

#endif /* __WIN32__ */
Expand Down

0 comments on commit c10afa4

Please sign in to comment.