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 2147 - Mouse wheel won't register due to WHEEL_DOWN usage in SDL_windowsevents.c
Summary: Mouse wheel won't register due to WHEEL_DOWN usage in SDL_windowsevents.c
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: x86 Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 09:10 UTC by Dominik Tugend
Modified: 2013-10-15 02:00 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 Dominik Tugend 2013-10-11 09:10:51 UTC
Long description can be found here:
https://github.com/ValveSoftware/halflife/issues/1377#issuecomment-26082526

Short description:
The problem is in SDL_windowsevents.c:
The mouse driver of i.e. the Microsoft Wireless Mouse 5000 and the Microsoft Wireless Mouse 1000 causes WM_MOUSEWHEEL messages with delta being lower than WHEEL_DELTA, which results to motion = 0 ( short motion = GET_WHEEL_DELTA_WPARAM(wParam) / WHEEL_DELTA; ).

Possible solution:
Accumulate deltas, as the FIXME comment says there or read what Mirosoft suggests ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms645617.aspx ) (either accumlate or scroll partial lines, which would require motion to be a floating point number).

(I am using SDL-2.0.0-7046)
Comment 1 Sam Lantinga 2013-10-14 03:00:10 UTC
This should be fixed, thanks!
http://hg.libsdl.org/SDL/rev/d8fb783475d5
Comment 2 Dominik Tugend 2013-10-14 12:55:17 UTC
Richard Rohac tested with a Microsoft Wireless Mouse 1000 and the issue seems really fixed now.

Thank you.

This should fix the problem for several Microsoft mice (i.e. when using the Microsoft Intellipoint Software), including:
Microsoft Wireless Mouse 1000
Microsoft Wireless Mouse 5000
Microsoft Intellimouse Explorer 2.0 (wireless)
Microsoft Comfort Optical Mouse 300
Comment 3 Sam Lantinga 2013-10-15 02:00:44 UTC
Great, thanks for the report! :)