mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-22 23:29:18 -05:00
fix: cursor lock/unlock inconsistent behaviour on glfw, rgfw, sl (#5323)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user