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
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue