1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +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:
DS
2025-02-22 16:17:07 +01:00
committed by GitHub
parent 0667cbf5a2
commit 0890125962

View File

@@ -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;
}