Skip to content

Commit

Permalink
Update rcore_desktop.c
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Mar 18, 2024
1 parent 9bb3d99 commit 28c232d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/platforms/rcore_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,7 @@ void EnableCursor(void)
// Set cursor position in the middle
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);

if (glfwRawMouseMotionSupported())
glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);
if (glfwRawMouseMotionSupported()) glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);

CORE.Input.Mouse.cursorHidden = false;
}
Expand All @@ -986,8 +985,7 @@ void DisableCursor(void)
// Set cursor position in the middle
SetMousePosition(CORE.Window.screen.width/2, CORE.Window.screen.height/2);

if (glfwRawMouseMotionSupported())
glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);
if (glfwRawMouseMotionSupported()) glfwSetInputMode(platform.handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);

CORE.Input.Mouse.cursorHidden = true;
}
Expand Down

0 comments on commit 28c232d

Please sign in to comment.