mousewheel partially broken on macOS 10.12, SDL hg

Eric Wasylishen <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <CAG=nYAZ6yW7CPZ1vrEj9g1s9Lnjm_BVF1mco1=d3mooU16r4mA@mail.gmail.com>
Hi,
If I run the "testrelative" SDL demo with "--info all", I'm noticing
that rolling the scroll wheel one "notch" doesn't generate a scroll
event. If I keep rolling it, I will start to see scroll events logged.
This is with a logitech G400, or a microsoft ergonomic mouse.

What's happening is, in Cocoa_HandleMouseWheel the deltaY for
scrolling the scroll wheel one notch is 0.00172424316. SDL adds 0.9 to
that, and the resuting value is truncated to an int which results in
0.

I don't think this happened in OS X 10.11.
As an immediate fix, if the delta is non-zero, we could snap it to 1
or -1. Maybe this needs a runtime macOS version check to avoid
changing the scroll behaviour on previous mac versions?

Eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.