src/video/windows/SDL_windowsevents.c
changeset 11761 74f570e0b634
parent 11758 c70cf178aacb
child 11811 5d94cb6b24d3
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Mon Dec 11 11:34:53 2017 -0800
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Mon Dec 11 11:47:52 2017 -0800
     1.3 @@ -1083,14 +1083,13 @@
     1.4  static SDL_bool
     1.5  IsWin10FCUorNewer(void)
     1.6  {
     1.7 -    typedef LONG(WINAPI* RtlGetVersionPtr)(struct SDL_WIN_OSVERSIONINFOW*);
     1.8 -    struct SDL_WIN_OSVERSIONINFOW info;
     1.9 -    SDL_zero(info);
    1.10 -
    1.11      HMODULE handle = GetModuleHandleW(L"ntdll.dll");
    1.12      if (handle) {
    1.13 +        typedef LONG(WINAPI* RtlGetVersionPtr)(struct SDL_WIN_OSVERSIONINFOW*);
    1.14          RtlGetVersionPtr getVersionPtr = (RtlGetVersionPtr)GetProcAddress(handle, "RtlGetVersion");
    1.15          if (getVersionPtr != NULL) {
    1.16 +            struct SDL_WIN_OSVERSIONINFOW info;
    1.17 +            SDL_zero(info);
    1.18              info.dwOSVersionInfoSize = sizeof(info);
    1.19              if (getVersionPtr(&info) == 0) { /* STATUS_SUCCESS == 0 */
    1.20                  if (   (info.dwMajorVersion == 10 && info.dwMinorVersion == 0 && info.dwBuildNumber >= 16299)