From 45fbe73f2b6d2d91c52f9b0ef574a72d7fe5fc9f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 25 Mar 2024 22:48:01 -0400 Subject: [PATCH] Simplify output of windows version. If unknown build number just output "Windows Build #####" --- src/platform.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/platform.cpp b/src/platform.cpp index b324bd0b5c..7e9fa820fa 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -249,12 +249,7 @@ std::string platform::os_info() } else if (build == "22631") { buf = "Windows 11 23H2"; } else { - const char *entry = "ProductName"; - RegGetValue(HKEY_LOCAL_MACHINE, subkey, entry, RRF_RT_REG_SZ, nullptr, &value, - (LPDWORD) &value_length); - // enforce zero termination - value[1023] = '\0'; - buf = value; + buf = "Windows Build " + build; } DWORD fullversion, majorv, minorv, buildv = 0; fullversion = GetVersion();