mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
SDL Irr device: Ignore +-0.0f y mouse wheel events (#15815)
our code often assumes that it's non-zero, e.g.: `event.MouseInput.Wheel < 0 ? -1 : 1`
This commit is contained in:
@@ -706,6 +706,10 @@ bool CIrrDeviceSDL::run()
|
||||
irrevent.MouseInput.X = MouseX;
|
||||
irrevent.MouseInput.Y = MouseY;
|
||||
|
||||
// wheel y can be 0 if scrolling sideways
|
||||
if (irrevent.MouseInput.Wheel == 0.0f)
|
||||
break;
|
||||
|
||||
postEventFromUser(irrevent);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user