]> git.tdb.fi Git - libs/gui.git/commitdiff
Windows compilation fixes
authorMikko Rasa <tdb@tdb.fi>
Sun, 20 Dec 2015 13:45:12 +0000 (15:45 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 20 Dec 2015 13:45:12 +0000 (15:45 +0200)
source/graphics/windows/window.cpp
source/input/gesturedetector.cpp
source/input/windows/keyboard.cpp
source/input/windows/touchscreen.cpp

index 8d7a342621635dd3e3c738abad67939ddf5c8ac0..046894f7e8815c2a90864cead486c3ac1c2163d7 100644 (file)
@@ -174,7 +174,7 @@ bool Window::event(const Event &evnt)
        case WM_RBUTTONUP:
        case WM_MOUSEWHEEL:
        case WM_MOUSEMOVE:
-       case WM_TOUCHMOVE:
+       case WM_TOUCH:
                signal_input_event.emit(evnt);
                break;
        case WM_SIZE:
index 98e3ff30522bdf6de8fbe7a8b052ddbadb54f92d..296aab40f36bd4f715a0b579cb29e03ec1a123c1 100644 (file)
@@ -1,3 +1,4 @@
+#define _USE_MATH_DEFINES
 #include <cmath>
 #include <sigc++/bind_return.h>
 #include "gesturedetector.h"
index e6882fe917dd3183089460107fe8c24e162e0bf0..a598ac8450dcaf4735134d12a80876c43eb35fbe 100644 (file)
@@ -4,7 +4,9 @@
 #include "keys.h"
 #include "keys_private.h"
 
+#ifndef MAPVK_VK_TO_VSC
 #define MAPVK_VK_TO_VSC 0
+#endif
 
 namespace Msp {
 namespace Input {
index d6e76e023c44174fa89eecb730130c64adf13fa6..73f67fe15b2f9d0cb599ee605db5af293fc15093 100644 (file)
@@ -10,7 +10,7 @@ namespace Input {
 
 bool Touchscreen::is_available()
 {
-       // Must have at least Windows 7 (WinNT 6.1) for WM_TOUCHMOVE
+       // Must have at least Windows 7 (WinNT 6.1) for WM_TOUCH
        OSVERSIONINFOEX version;
        version.dwOSVersionInfoSize = sizeof(version);
        version.dwMajorVersion = 6;
@@ -32,7 +32,7 @@ bool Touchscreen::is_available()
 
 void Touchscreen::input_event(const Graphics::Window::Event &event)
 {
-       if(event.msg==WM_TOUCHMOVE)
+       if(event.msg==WM_TOUCH)
        {
                HTOUCHINPUT handle = reinterpret_cast<HTOUCHINPUT>(event.lparam);
                unsigned n_points = LOWORD(event.wparam);