From bfb3a797ff4e58c5c54c287018969d8cfb1fde67 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Dec 2019 14:02:09 +0100 Subject: [PATCH] - do not send mouse wheel "up" events right after "down". The input system needs to be able to detect them in a "pressed" state, even though that doesn't physically exist. --- source/platform/win32/i_mouse.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/platform/win32/i_mouse.cpp b/source/platform/win32/i_mouse.cpp index 3e72d1cb3..82cdbe3d7 100644 --- a/source/platform/win32/i_mouse.cpp +++ b/source/platform/win32/i_mouse.cpp @@ -389,8 +389,9 @@ void FMouse::WheelMoved(int axis, int wheelmove) { ev.type = EV_KeyDown; D_PostEvent(&ev); - ev.type = EV_KeyUp; - D_PostEvent(&ev); + // The Up events must be delayed so that the wheel can remain in a "pressed" state for the next tic's duration. + //ev.type = EV_KeyUp; + //D_PostEvent(&ev); WheelMove[axis] += dir; } }