From 02b79819b3a3b33fd2e45a4743c515930351f59f Mon Sep 17 00:00:00 2001 From: Axel Gembe Date: Sat, 3 Aug 2019 09:15:41 +0700 Subject: Windows: Fix detection of Windows 10 when manifest declares support On Windows 10 GetVersionEx will return version 10.0 when the running application has a manifest that declares Windows 10 compatibility. https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests#supportedOS When no such manifest is found, the call will report version 6.2, which is Windows 8. The 6.4 version is returned by early Windows 10 Insider Previews and Windows Server 2017 Technical Preview 1. Closes #604 Signed-off-by: Axel Gembe Signed-off-by: Nathan Hjelm --- libusb/os/windows_nt_common.c | 3 ++- libusb/version_nano.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libusb/os/windows_nt_common.c b/libusb/os/windows_nt_common.c index 7ead83d..54338a7 100644 --- a/libusb/os/windows_nt_common.c +++ b/libusb/os/windows_nt_common.c @@ -470,7 +470,8 @@ static void get_windows_version(void) case 0x61: windows_version = WINDOWS_7; w = (ws ? "7" : "2008_R2"); break; case 0x62: windows_version = WINDOWS_8; w = (ws ? "8" : "2012"); break; case 0x63: windows_version = WINDOWS_8_1; w = (ws ? "8.1" : "2012_R2"); break; - case 0x64: windows_version = WINDOWS_10; w = (ws ? "10" : "2016"); break; + case 0x64: // Early Windows 10 Insider Previews and Windows Server 2017 Technical Preview 1 used version 6.4 + case 0xA0: windows_version = WINDOWS_10; w = (ws ? "10" : "2016"); break; default: if (version < 0x50) { return; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index ba8b13c..5469eb2 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11379 +#define LIBUSB_NANO 11380 -- cgit v1.2.1