From c25d0b85e304ab81bdd8b58a69de3e6a5548f4ee Mon Sep 17 00:00:00 2001 From: ubkp <118854183+ubkp@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:27:44 -0300 Subject: [PATCH] Add more missing implementations 2 --- src/rcore_desktop_sdl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rcore_desktop_sdl.c b/src/rcore_desktop_sdl.c index 752406ecb..fe7fd27eb 100644 --- a/src/rcore_desktop_sdl.c +++ b/src/rcore_desktop_sdl.c @@ -482,8 +482,8 @@ void HideCursor(void) // Enables cursor (unlock cursor) void EnableCursor(void) { - // Set cursor position in the middle - SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2); + SDL_SetRelativeMouseMode(SDL_FALSE); + SDL_ShowCursor(SDL_ENABLE); CORE.Input.Mouse.cursorHidden = false; } @@ -491,8 +491,7 @@ void EnableCursor(void) // Disables cursor (lock cursor) void DisableCursor(void) { - // Set cursor position in the middle - SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2); + SDL_SetRelativeMouseMode(SDL_TRUE); CORE.Input.Mouse.cursorHidden = true; }