Fixed a linker error when building SDL/WinRT
authorDavid Ludwig <dludwig@pobox.com>
Tue, 29 Apr 2014 19:22:48 -0400
changeset 8746 0b4938c34e75
parent 8745 74c7ce77a780
child 8747 b4a56c2ca0f0
Fixed a linker error when building SDL/WinRT 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.
src/core/windows/SDL_windows.c
--- a/src/core/windows/SDL_windows.c	Tue Apr 29 19:06:00 2014 -0400
+++ b/src/core/windows/SDL_windows.c	Tue Apr 29 19:22:48 2014 -0400
@@ -93,6 +93,7 @@
 #endif
 }
 
+#ifndef __WINRT__
 static BOOL
 IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
 {
@@ -112,10 +113,15 @@
 
     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__ */