mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
Add handling of left and right mousewheel events to the SDL2 input path
This commit is contained in:
parent
cce270ba72
commit
07e0323771
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue