From 95657ee1cbea6d9f9ce975a862e401f43ae3e993 Mon Sep 17 00:00:00 2001 From: electrolys Date: Sat, 26 Oct 2024 19:19:01 -0500 Subject: [PATCH] Fix the fix cause I didn't test it --- src/platforms/rcore_desktop_sdl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 4797e6dc..2aabf32a 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -1025,7 +1025,11 @@ void PollInputEvents(void) CORE.Input.Mouse.currentWheelMove.y = 0; // Register previous mouse position - if (platform.cursorRelative) CORE.Input.Mouse.previousPosition = (Vector2){ 0.0f, 0.0f }; + if (platform.cursorRelative) + { + CORE.Input.Mouse.previousPosition = (Vector2){ 0.0f, 0.0f }; + CORE.Input.Mouse.currentPosition = (Vector2){ 0.0f, 0.0f }; + } else CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition; // Reset last gamepad button/axis registered state