mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01: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:
parent
0667cbf5a2
commit
0890125962
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue