Skip to content

Commit

Permalink
Merge pull request #1483 from dpogue/windows-2022
Browse files Browse the repository at this point in the history
hsSystemInfo: Windows Server 2022 detection
  • Loading branch information
dpogue authored Sep 9, 2023
2 parents 1101d26 + 5ea30eb commit 70f379c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Plasma/CoreLib/hsSystemInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ static inline bool IGetWindowsVersion(const RTL_OSVERSIONINFOEXW& info, ST::stri
ss << "Server 2016 ";
else if (info.dwMajorVersion == 10 && info.dwBuildNumber == 17763 && server.value())
ss << "Server 2019 ";
else if (info.dwMajorVersion == 10 && info.dwBuildNumber == 20348 && server.value())
ss << "Server 2022 ";
else if (info.dwMajorVersion == 10 && info.dwBuildNumber >= 22000 && !server.value())
ss << "11 ";
else if (info.dwPlatformId & VER_PLATFORM_WIN32_NT)
Expand All @@ -292,7 +294,7 @@ static inline bool IGetWindowsVersion(const RTL_OSVERSIONINFOEXW& info, ST::stri
if (info.wProductType == VER_NT_WORKSTATION)
ss << "Professional ";

if (info.szCSDVersion && *info.szCSDVersion)
if (info.szCSDVersion[0])
ss << info.szCSDVersion << ' ';

ss << "(Build " << info.dwBuildNumber << ')';
Expand Down

0 comments on commit 70f379c

Please sign in to comment.