fix: cursor lock/unlock inconsistent behaviour on glfw, rgfw, sl (#5323)
This commit is contained in:
parent
46e8343a30
commit
cc83b2bd8e
1 changed files with 11 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue