- 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

@ -2065,9 +2065,19 @@ int32_t handleevents(void)
{
int32_t rv;
if (inputchecked && g_mouseEnabled)
{
g_mouseBits &= ~(16 | 32);
if (inputchecked && g_mouseEnabled)
{
// 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();