From: Mikko Rasa Date: Sun, 20 Dec 2015 13:45:12 +0000 (+0200) Subject: Windows compilation fixes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8d865a51910c5ef9643a7f9a32e7cab5ec5359e4;p=libs%2Fgui.git Windows compilation fixes --- diff --git a/source/graphics/windows/window.cpp b/source/graphics/windows/window.cpp index 8d7a342..046894f 100644 --- a/source/graphics/windows/window.cpp +++ b/source/graphics/windows/window.cpp @@ -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: diff --git a/source/input/gesturedetector.cpp b/source/input/gesturedetector.cpp index 98e3ff3..296aab4 100644 --- a/source/input/gesturedetector.cpp +++ b/source/input/gesturedetector.cpp @@ -1,3 +1,4 @@ +#define _USE_MATH_DEFINES #include #include #include "gesturedetector.h" diff --git a/source/input/windows/keyboard.cpp b/source/input/windows/keyboard.cpp index e6882fe..a598ac8 100644 --- a/source/input/windows/keyboard.cpp +++ b/source/input/windows/keyboard.cpp @@ -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 { diff --git a/source/input/windows/touchscreen.cpp b/source/input/windows/touchscreen.cpp index d6e76e0..73f67fe 100644 --- a/source/input/windows/touchscreen.cpp +++ b/source/input/windows/touchscreen.cpp @@ -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(event.lparam); unsigned n_points = LOWORD(event.wparam);