summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-05-01 17:46:51 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-05-01 17:46:51 +0300
commit9c7083d03a6276980c727ea28a7c6a6d2248c68d (patch)
treece8596e8366301c3f2b68f75b90c98b42c14015f
parentaa002aef2ec00f4d34d68a7ce50a86577b375c37 (diff)
fixes #4387 (CrashDumper: отличать Windows 10 от Windows 11)
-rw-r--r--src/mir_core/src/Windows/winver.cpp5
1 files 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: