Skip to content

Commit 50bde9f

Browse files
committed
events: Mousewheels need to report current mouse position.
Reference issue #215.
1 parent cff5d80 commit 50bde9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SDL12_compat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4616,8 +4616,8 @@ EventFilter20to12(void *data, SDL_Event *event20)
46164616
event12.button.which = (Uint8) event20->wheel.which;
46174617
event12.button.button = (event20->wheel.y > 0) ? 4 : 5; /* wheelup is 4, down is 5. */
46184618
event12.button.state = SDL_PRESSED;
4619-
event12.button.x = 0;
4620-
event12.button.y = 0;
4619+
event12.button.x = MousePosition.x;
4620+
event12.button.y = MousePosition.y;
46214621
PushEventIfNotFiltered(&event12);
46224622

46234623
event12.type = SDL12_MOUSEBUTTONUP; /* immediately release mouse "button" at the end of this switch. */

0 commit comments

Comments
 (0)