From 9c7083d03a6276980c727ea28a7c6a6d2248c68d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 May 2024 17:46:51 +0300 Subject: =?UTF-8?q?fixes=20#4387=20(CrashDumper:=20=D0=BE=D1=82=D0=BB?= =?UTF-8?q?=D0=B8=D1=87=D0=B0=D1=82=D1=8C=20Windows=2010=20=D0=BE=D1=82=20?= =?UTF-8?q?Windows=2011)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_core/src/Windows/winver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mir_core/src/Windows/winver.cpp b/src/mir_core/src/Windows/winver.cpp index 1f99c5f90a..d43cfd3fa3 100644 --- a/src/mir_core/src/Windows/winver.cpp +++ b/src/mir_core/src/Windows/winver.cpp @@ -181,11 +181,12 @@ MIR_CORE_DLL(BOOL) OS_GetDisplayString(char *buf, size_t bufSize) // Test for the specific product. if (osvi.dwMajorVersion >= 6) { + int iVersion = (osvi.dwBuildNumber > 22000) ? 11 : 10; if (osvi.dwMajorVersion == 10) { if (osvi.wProductType == VER_NT_WORKSTATION) - ret.Append("Windows 10 "); + ret.AppendFormat("Windows %d ", iVersion); else - ret.Append("Windows Server 10 "); + ret.AppendFormat("Windows Server %d ", iVersion); } else switch (osvi.dwMinorVersion) { case 0: -- cgit v1.2.3