Windows: Fix detection of Windows 10 when manifest declares support
authorAxel Gembe <derago@gmail.com>
Sat, 3 Aug 2019 02:15:41 +0000 (09:15 +0700)
committerNathan Hjelm <hjelmn@google.com>
Fri, 9 Aug 2019 16:09:36 +0000 (09:09 -0700)
commit02b79819b3a3b33fd2e45a4743c515930351f59f
treeea15aa6021c772626cea43143ae751043bdde53c
parent96a1f3737584b6b3384d0d5e821e8b7fcae8f2cb
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>
libusb/os/windows_nt_common.c
libusb/version_nano.h