- added handling for cleariung mouse wheel events

This commit is contained in:
Christoph Oelckers 2019-11-04 01:07:34 +01:00
parent 29b7e1cf79
commit 4bf6c306ab

View file

@ -2067,7 +2067,17 @@ int32_t handleevents(void)
if (inputchecked && g_mouseEnabled)
{
g_mouseBits &= ~(16 | 32);
// This is a horrible crutch
if (inputState.mouseReadButtons() & WHEELUP_MOUSE)
{
event_t ev = { EV_KeyUp, 0, (int16_t)KEY_MWHEELUP };
D_PostEvent(&ev);
}
if (inputState.mouseReadButtons() & WHEELDOWN_MOUSE)
{
event_t ev = { EV_KeyUp, 0, (int16_t)KEY_MWHEELDOWN };
D_PostEvent(&ev);
}
}
rv = handleevents_pollsdl();