src/video/windows/SDL_windowsevents.c
changeset 11761 74f570e0b634
parent 11758 c70cf178aacb
child 11811 5d94cb6b24d3
equal deleted inserted replaced
11760:e85aa67038df 11761:74f570e0b634
  1081 };
  1081 };
  1082 
  1082 
  1083 static SDL_bool
  1083 static SDL_bool
  1084 IsWin10FCUorNewer(void)
  1084 IsWin10FCUorNewer(void)
  1085 {
  1085 {
  1086     typedef LONG(WINAPI* RtlGetVersionPtr)(struct SDL_WIN_OSVERSIONINFOW*);
       
  1087     struct SDL_WIN_OSVERSIONINFOW info;
       
  1088     SDL_zero(info);
       
  1089 
       
  1090     HMODULE handle = GetModuleHandleW(L"ntdll.dll");
  1086     HMODULE handle = GetModuleHandleW(L"ntdll.dll");
  1091     if (handle) {
  1087     if (handle) {
       
  1088         typedef LONG(WINAPI* RtlGetVersionPtr)(struct SDL_WIN_OSVERSIONINFOW*);
  1092         RtlGetVersionPtr getVersionPtr = (RtlGetVersionPtr)GetProcAddress(handle, "RtlGetVersion");
  1089         RtlGetVersionPtr getVersionPtr = (RtlGetVersionPtr)GetProcAddress(handle, "RtlGetVersion");
  1093         if (getVersionPtr != NULL) {
  1090         if (getVersionPtr != NULL) {
       
  1091             struct SDL_WIN_OSVERSIONINFOW info;
       
  1092             SDL_zero(info);
  1094             info.dwOSVersionInfoSize = sizeof(info);
  1093             info.dwOSVersionInfoSize = sizeof(info);
  1095             if (getVersionPtr(&info) == 0) { /* STATUS_SUCCESS == 0 */
  1094             if (getVersionPtr(&info) == 0) { /* STATUS_SUCCESS == 0 */
  1096                 if (   (info.dwMajorVersion == 10 && info.dwMinorVersion == 0 && info.dwBuildNumber >= 16299)
  1095                 if (   (info.dwMajorVersion == 10 && info.dwMinorVersion == 0 && info.dwBuildNumber >= 16299)
  1097                     || (info.dwMajorVersion == 10 && info.dwMinorVersion > 0)
  1096                     || (info.dwMajorVersion == 10 && info.dwMinorVersion > 0)
  1098                     || (info.dwMajorVersion > 10) )
  1097                     || (info.dwMajorVersion > 10) )