Fixed bug #382
Added horizontal scrolling support --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402428
This commit is contained in:
parent
e33ee1a0e2
commit
43e5d2b938
7 changed files with 41 additions and 20 deletions
|
@ -427,12 +427,12 @@ SDL_SendMouseButton(int index, Uint8 state, Uint8 button)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_SendMouseWheel(int index, int motion)
|
||||
SDL_SendMouseWheel(int index, int x, int y)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse(index);
|
||||
int posted;
|
||||
|
||||
if (!mouse || !motion) {
|
||||
if (!mouse || (!x && !y)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,8 @@ SDL_SendMouseWheel(int index, int motion)
|
|||
SDL_Event event;
|
||||
event.type = SDL_MOUSEWHEEL;
|
||||
event.wheel.which = (Uint8) index;
|
||||
event.wheel.motion = motion;
|
||||
event.wheel.x = x;
|
||||
event.wheel.y = y;
|
||||
event.wheel.windowID = mouse->focus;
|
||||
posted = (SDL_PushEvent(&event) > 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue