Add handling of left and right mousewheel events to the SDL2 input path

This commit is contained in:
Robert Cochran 2019-02-14 13:13:44 -08:00 committed by Christoph Oelckers
parent cce270ba72
commit 07e0323771

View file

@ -378,7 +378,12 @@ void MessagePump (const SDL_Event &sev)
else
{
event.type = EV_KeyDown;
event.data1 = sev.wheel.y > 0 ? KEY_MWHEELUP : KEY_MWHEELDOWN;
if (sev.wheel.y != 0)
event.data1 = sev.wheel.y > 0 ? KEY_MWHEELUP : KEY_MWHEELDOWN;
else
event.data1 = sev.wheel.x > 0 ? KEY_MWHEELRIGHT : KEY_MWHEELLEFT;
D_PostEvent (&event);
event.type = EV_KeyUp;
D_PostEvent (&event);