]> git.tdb.fi Git - libs/gui.git/commitdiff
Fix Windows version check for touch input
authorMikko Rasa <tdb@tdb.fi>
Sun, 18 Dec 2022 16:46:30 +0000 (18:46 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 18 Dec 2022 16:46:30 +0000 (18:46 +0200)
source/graphics/windows/window.cpp

index e7ec9109c5fa16f1f19db2f5930359cd77a39d17..0e3365393e653ebdf829be465d6efb30d57ee169 100644 (file)
@@ -1,7 +1,8 @@
-#define _WIN32_WINNT 0x0601
+#define _WIN32_WINNT 0x0601  // Windows 7
 #include "window.h"
 #include "window_private.h"
 #include <windowsx.h>
+#include <versionhelpers.h>
 #include <msp/core/application.h>
 #include <msp/core/systemerror.h>
 
@@ -141,8 +142,7 @@ void Window::warp_pointer(int, int)
 
 void Window::platform_set_touch_input()
 {
-       WORD winver = LOWORD(GetVersion);
-       if(winver<_WIN32_WINNT)
+       if(!IsWindows7OrGreater())
        {
                touch_input = false;
                throw runtime_error("no touch support");