Fixed a linker error when building SDL/WinRT
authorDavid Ludwig <dludwig@pobox.com>
Tue, 29 Apr 2014 19:22:48 -0400
changeset 87460b4938c34e75
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
     1.1 --- a/src/core/windows/SDL_windows.c	Tue Apr 29 19:06:00 2014 -0400
     1.2 +++ b/src/core/windows/SDL_windows.c	Tue Apr 29 19:22:48 2014 -0400
     1.3 @@ -93,6 +93,7 @@
     1.4  #endif
     1.5  }
     1.6  
     1.7 +#ifndef __WINRT__
     1.8  static BOOL
     1.9  IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
    1.10  {
    1.11 @@ -112,10 +113,15 @@
    1.12  
    1.13      return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE;
    1.14  }
    1.15 +#endif
    1.16  
    1.17  BOOL WIN_IsWindowsVistaOrGreater()
    1.18  {
    1.19 +#ifdef __WINRT__
    1.20 +    return TRUE;
    1.21 +#else
    1.22      return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0);
    1.23 +#endif
    1.24  }
    1.25  
    1.26  #endif /* __WIN32__ */