Currently, the enableTrueColors function in terminal does the following to 
check for Windows 10:
    ver.dwOSVersionInfoSize = sizeof(ver).DWORD
    let res = getVersionExW(addr ver)

if res == 0:
    term.trueColorIsSupported = false
else:
    

term.trueColorIsSupported = ver.dwMajorVersion > 10 or
    (ver.dwMajorVersion == 10 and (ver.dwMinorVersion > 0 or 
(ver.dwMinorVersion == 0 and ver.dwBuildNumber >= 10586)))

This is wrong.

As of Windows 8, the GetVersionEx functions have been deprecated and this 
function will return the wrong version information as it pulls from the 
manifest which isn't updated (read: if upgrading from Windows 8 to 10, it 
returns a major version of 6 instead of 10). And lest someone think that the 
VerifyVersionInfo functions in the WINAPI will work, just know that they won't; 
they are now subject to the same manifest "bug"

Reply via email to