We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1095 - SDL_MouseWheelEvent doesn't report small negative scroll events
Summary: SDL_MouseWheelEvent doesn't report small negative scroll events
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.6
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 12:20 UTC by Vern Jensen
Modified: 2011-01-24 17:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vern Jensen 2011-01-19 12:20:56 UTC
SDL_MouseWheelEvent reports positive (upward) scroll events just fine, even when the wheel is barely moved. However, when the wheel is moved downward, it must be moved with slightly more force. If moved too small an amount per movement, nothing will be reported. 

I can verify that this is an SDL problem, not a problem with my mouse's scroll wheel, as scrolling windows in the Finder or Safari work just fine, even when going downward at the smallest movement possible.

This is using a Logitech mouse, but that shouldn't affect anything.

My guess is it's some sort of rounding error that affects values between 0 and -1 being rounded down to 0 instead of "up" to -1. Hence why values between 0 and 1 get reported as 1 properly.
Comment 1 Sam Lantinga 2011-01-24 16:22:25 UTC
I believe this is fixed in the latest snapshot, can you retest?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 2 Vern Jensen 2011-01-24 16:43:24 UTC
Yes, the scroll wheel now works perfectly!
Comment 3 Sam Lantinga 2011-01-24 17:48:55 UTC
Great! :)