fix: cursor lock/unlock inconsistent behaviour on glfw, rgfw, sl (#5323)

This commit is contained in:
Tiago Ferreira
2025-11-02 18:46:57 +00:00
committed by GitHub
parent 46e8343a30
commit cc83b2bd8e
3 changed files with 11 additions and 9 deletions

View File

@ -838,8 +838,9 @@ void EnableCursor(void)
// Set cursor position in the middle
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
RGFW_window_showMouse(platform.window, true);
CORE.Input.Mouse.cursorHidden = false;
ShowCursor();
CORE.Input.Mouse.cursorLocked = true;
}
// Disables cursor (lock cursor)
@ -848,6 +849,8 @@ void DisableCursor(void)
RGFW_disableCursor = true;
RGFW_window_mouseHold(platform.window, RGFW_AREA(0, 0));
HideCursor();
CORE.Input.Mouse.cursorLocked = true;
}
// Swap back buffer with front buffer (screen drawing)