mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-16 03:03:19 +00:00
Update rcore_desktop.c
This commit is contained in:
parent
9bb3d9977a
commit
28c232d856
@ -972,8 +972,7 @@ void EnableCursor(void)
|
|||||||
// Set cursor position in the middle
|
// Set cursor position in the middle
|
||||||
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
|
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
|
||||||
|
|
||||||
if (glfwRawMouseMotionSupported())
|
if (glfwRawMouseMotionSupported()) glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);
|
||||||
glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);
|
|
||||||
|
|
||||||
CORE.Input.Mouse.cursorHidden = false;
|
CORE.Input.Mouse.cursorHidden = false;
|
||||||
}
|
}
|
||||||
@ -986,8 +985,7 @@ void DisableCursor(void)
|
|||||||
// Set cursor position in the middle
|
// Set cursor position in the middle
|
||||||
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
|
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);
|
||||||
|
|
||||||
if (glfwRawMouseMotionSupported())
|
if (glfwRawMouseMotionSupported()) glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);
|
||||||
glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);
|
|
||||||
|
|
||||||
CORE.Input.Mouse.cursorHidden = true;
|
CORE.Input.Mouse.cursorHidden = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user