From d18eb842633ada7509c3cb081fbb3e4d2345d468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 5 Aug 2014 22:03:45 -0700 Subject: [PATCH] Updated mouse wheel message. --- examples/common/entry/entry_windows.cpp | 7 +++++-- examples/common/entry/input.cpp | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 0d5662b5..26a4c183 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -380,10 +380,13 @@ namespace entry case WM_MOUSEWHEEL: { - int32_t mx = GET_X_LPARAM(_lparam); - int32_t my = GET_Y_LPARAM(_lparam); + POINT pt = { GET_X_LPARAM(_lparam), GET_Y_LPARAM(_lparam) }; + ScreenToClient(m_hwnd, &pt); + int32_t mx = pt.x; + int32_t my = pt.y; int32_t mz = GET_WHEEL_DELTA_WPARAM(_wparam); m_eventQueue.postMouseEvent(mx, my, mz); + m_eventQueue.postMouseEvent(mx, my, 0); } break; diff --git a/examples/common/entry/input.cpp b/examples/common/entry/input.cpp index 8b3e909a..6ab67617 100644 --- a/examples/common/entry/input.cpp +++ b/examples/common/entry/input.cpp @@ -204,7 +204,6 @@ void inputSetKeyState(entry::Key::Enum _key, uint8_t _modifiers, bool _down) void inputSetMousePos(int32_t _mx, int32_t _my, int32_t _mz) { - DBG("%d, %d, %d", _mx, _my, _mz); s_input.m_mouse.setPos(_mx, _my, _mz); }