Added mouse wheel deltas with floating point precision

Fixes https://github.com/libsdl-org/SDL/issues/4888
This commit is contained in:
Sam Lantinga committed 2021-11-08 09:44:31 -08:00
1 parent d95a52c9a5
commit 5dbbc8e61f
2 files changed
+4 -4

No files matched your search

+2 -4
View File
@@ -650,12 +650,10 @@ SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, float x, float y, S
event.type = SDL_MOUSEWHEEL;
event.wheel.windowID = mouse->focus ? mouse->focus->id : 0;
event.wheel.which = mouseID;
#if 0 /* Uncomment this when it goes in for SDL 2.1 */
event.wheel.preciseX = x;
event.wheel.preciseY = y;
#endif
event.wheel.x = integral_x;
event.wheel.y = integral_y;
event.wheel.preciseX = x;
event.wheel.preciseY = y;
event.wheel.direction = (Uint32)direction;
posted = (SDL_PushEvent(&event) > 0);
}