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 <derago@gmail.com>
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
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 @@
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