Added version detection for Windows 8.1/Server 2012 R2 and Windows 10/Server 2016.

This commit is contained in:
Knightmare66 2019-09-09 05:00:57 -04:00
parent 9b61347592
commit 8dd73fd86e

View file

@ -1122,6 +1122,18 @@ void Sys_Init (void)
else
Q_strncpyz (string, "Windows Server 2008 2012", sizeof(string));
}
else if (osInfo.dwMajorVersion == 6 && osInfo.dwMinorVersion == 3) {
if (osInfo.wProductType == VER_NT_WORKSTATION)
Q_strncpyz (string, "Windows 8.1", sizeof(string));
else
Q_strncpyz (string, "Windows Server 2012 R2", sizeof(string));
}
else if (osInfo.dwMajorVersion == 10 && osInfo.dwMinorVersion == 0) {
if (osInfo.wProductType == VER_NT_WORKSTATION)
Q_strncpyz (string, "Windows 10", sizeof(string));
else
Q_strncpyz (string, "Windows Server 2016", sizeof(string));
}
else
Q_strncpyz (string, va("Windows %i.%i", osInfo.dwMajorVersion, osInfo.dwMinorVersion), sizeof(string));