summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Gembe <derago@gmail.com>2019-08-03 02:15:41 (GMT)
committerNathan Hjelm <hjelmn@google.com>2019-08-09 16:09:36 (GMT)
commit02b79819b3a3b33fd2e45a4743c515930351f59f (patch)
treeea15aa6021c772626cea43143ae751043bdde53c
parent96a1f3737584b6b3384d0d5e821e8b7fcae8f2cb (diff)
downloadlibusb-02b79819b3a3b33fd2e45a4743c515930351f59f.tar.gz
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>
-rw-r--r--libusb/os/windows_nt_common.c3
-rw-r--r--libusb/version_nano.h2
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