Re: mousewheel partially broken on macOS 10.12, SDL hg

Eric Wasylishen <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <CAG=nYAYejnmbVN1GhnzSgmjwH8Bz6cf1S=OZg0GnOCVeNLjbUQ@mail.gmail.com>
Posted to the bugtracker with a possible fix here:
https://bugzilla.libsdl.org/show_bug.cgi?id=3432

On Wed, Sep 21, 2016 at 11:36 AM, Eric Wasylishen <[email protected]> wrote:
> 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.