]> git.tdb.fi Git - libs/gui.git/commitdiff
Fix the Windows version check in Touchscreen::is_available
authorMikko Rasa <tdb@tdb.fi>
Mon, 22 Dec 2014 14:38:00 +0000 (16:38 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 22 Dec 2014 14:38:00 +0000 (16:38 +0200)
source/input/windows/touchscreen.cpp

index 7e314ca98d39f99ab4eb2cdbc5d1942292ae7d08..d6e76e023c44174fa89eecb730130c64adf13fa6 100644 (file)
@@ -15,11 +15,11 @@ bool Touchscreen::is_available()
        version.dwOSVersionInfoSize = sizeof(version);
        version.dwMajorVersion = 6;
        version.dwMinorVersion = 1;
-       version.dwServicePackMajor = 0;
-       version.dwServicePackMinor = 0;
+       version.wServicePackMajor = 0;
+       version.wServicePackMinor = 0;
        DWORD mask = VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR|VER_SERVICEPACKMINOR;
        DWORDLONG cond = VerSetConditionMask(0, mask, VER_GREATER_EQUAL);
-       if(!VerifyVersionInfo(&version, type, cond))
+       if(VerifyVersionInfo(&version, mask, cond))
                return false;
 
        if(!GetSystemMetrics(SM_TABLETPC))