소스 검색

UPD: Read Windows 10 version

Alexander Koblov 4 년 전
부모
커밋
bf761292ad
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/platform/udcversion.pas

+ 5 - 1
src/platform/udcversion.pas

@@ -381,8 +381,12 @@ begin
                       OSVersion := OSVersion + ' 10';
                       if (osvi.wSuiteMask and VER_SUITE_PERSONAL <> 0) then
                         OSVersion := OSVersion + ' Home';
-                      if RegReadKey(HKEY_LOCAL_MACHINE, CURRENT_VERSION, 'DisplayVersion', ReleaseId) then
+                      if ((osvi.dwBuildNumber >= 19042) and
+                         RegReadKey(HKEY_LOCAL_MACHINE, CURRENT_VERSION, 'DisplayVersion', ReleaseId)) or
+                         RegReadKey(HKEY_LOCAL_MACHINE, CURRENT_VERSION, 'ReleaseId', ReleaseId) then
+                      begin
                         OSVersion := OSVersion + ' ' + String(ReleaseId);
+                      end;
                     end
               end;
           end;