X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fwindows%2Ftouchscreen.cpp;h=ce8e5a2f71270c2278e97a6aba799c985d173907;hb=5089eb26984313f3a28ca7d941de97c509a45281;hp=7e314ca98d39f99ab4eb2cdbc5d1942292ae7d08;hpb=49e19af2c599e7316b5a01983adc040421429f86;p=libs%2Fgui.git diff --git a/source/input/windows/touchscreen.cpp b/source/input/windows/touchscreen.cpp index 7e314ca..ce8e5a2 100644 --- a/source/input/windows/touchscreen.cpp +++ b/source/input/windows/touchscreen.cpp @@ -10,16 +10,16 @@ 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; 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)) @@ -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); @@ -63,7 +63,5 @@ void Touchscreen::input_event(const Graphics::Window::Event &event) } } - - } // namespace Input } // namespace Msp