mirror of
https://github.com/minetest/irrlicht.git
synced 2025-03-06 20:49:24 +01:00
Fix build with older SDL2
This commit is contained in:
parent
3983c29645
commit
a2b6244f54
1 changed files with 4 additions and 0 deletions
|
@ -555,7 +555,11 @@ bool CIrrDeviceSDL::run()
|
|||
|
||||
irrevent.EventType = irr::EET_MOUSE_INPUT_EVENT;
|
||||
irrevent.MouseInput.Event = irr::EMIE_MOUSE_WHEEL;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 18)
|
||||
irrevent.MouseInput.Wheel = SDL_event.wheel.preciseY;
|
||||
#else
|
||||
irrevent.MouseInput.Wheel = SDL_event.wheel.y;
|
||||
#endif
|
||||
irrevent.MouseInput.Shift = (keymod & KMOD_SHIFT) != 0;
|
||||
irrevent.MouseInput.Control = (keymod & KMOD_CTRL) != 0;
|
||||
irrevent.MouseInput.X = MouseX;
|
||||
|
|
Loading…
Add table
Reference in a new issue