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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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