From 8dd73fd86e1457f059fc5ae2df08e38a7989d62d Mon Sep 17 00:00:00 2001 From: Knightmare66 Date: Mon, 9 Sep 2019 05:00:57 -0400 Subject: [PATCH] Added version detection for Windows 8.1/Server 2012 R2 and Windows 10/Server 2016. --- win32/sys_win.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/win32/sys_win.c b/win32/sys_win.c index 9a9ff52..891c556 100644 --- a/win32/sys_win.c +++ b/win32/sys_win.c @@ -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));