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 663 - Mouse events broken
Summary: Mouse events broken
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.0
Hardware: x86 Windows (All)
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-02 19:27 UTC by Will
Modified: 2009-01-02 22:12 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 Will 2009-01-02 19:27:17 UTC
SDL is not reporting which window a mouse event is cumming from (just reports 0).
Also the relative mouse position properties are broken in the mouse move event.
Comment 1 Will 2009-01-02 20:47:18 UTC
Looks like the mouse wheel event also does not report which window.

More importantly the direction of the scroll wheel is always positive.
This is a trivial fix.

replace the following in "SDL_win32events.c":

                if (raw->data.mouse.usButtonData != 0) {
                    SDL_SendMouseWheel(index, 0,
                                       raw->data.mouse.usButtonData);
                }

with:

                if (raw->data.mouse.usButtonData != 0) {
                    SDL_SendMouseWheel(index, 0,
                                       (short)raw->data.mouse.usButtonData);
                }
Comment 2 Sam Lantinga 2009-01-02 22:12:45 UTC
Fixed, thanks!

Committed revision 4329.