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

@ -1237,13 +1237,7 @@ void EnableCursor(void)
{
SDL_SetRelativeMouseMode(SDL_FALSE);
#if defined(USING_VERSION_SDL3)
// NOTE: SDL_ShowCursor() has been split into three functions:
// SDL_ShowCursor(), SDL_HideCursor(), and SDL_CursorVisible()
SDL_ShowCursor();
#else
SDL_ShowCursor(SDL_ENABLE);
#endif
ShowCursor();
CORE.Input.Mouse.cursorLocked = false;
}
@ -1253,6 +1247,9 @@ void DisableCursor(void)
{
SDL_SetRelativeMouseMode(SDL_TRUE);
HideCursor();
platform.cursorRelative = true;
CORE.Input.Mouse.cursorLocked = true;
}