SDL: Use precise mouse wheel values (#5830)

This commit is contained in:
Tanguy
2026-05-01 19:29:51 +02:00
committed by GitHub
parent d768dae402
commit 05c15c8ba7

View File

@@ -1675,8 +1675,13 @@ void PollInputEvents(void)
} break;
case SDL_MOUSEWHEEL:
{
CORE.Input.Mouse.currentWheelMove.x = (float)event.wheel.x;
CORE.Input.Mouse.currentWheelMove.y = (float)event.wheel.y;
#if defined(USING_VERSION_SDL3)
CORE.Input.Mouse.currentWheelMove.x = event.wheel.x;
CORE.Input.Mouse.currentWheelMove.y = event.wheel.y;
#else
CORE.Input.Mouse.currentWheelMove.x = event.wheel.preciseX;
CORE.Input.Mouse.currentWheelMove.y = event.wheel.preciseY;
#endif
} break;
case SDL_MOUSEMOTION:
{