mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 14:45:46 +00:00
Add cursor mode GLFW_CURSOR_CAPTURED
This adds a cursor mode that provides a visible cursor confined to the content area of the window. Fixes #58
This commit is contained in:
committed by
Camilla Löwy
parent
a46f829de8
commit
488008e0a2
@@ -1619,8 +1619,16 @@ void _glfwSetCursorPosCocoa(_GLFWwindow* window, double x, double y)
|
||||
void _glfwSetCursorModeCocoa(_GLFWwindow* window, int mode)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
||||
if (mode == GLFW_CURSOR_CAPTURED)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNIMPLEMENTED,
|
||||
"Cocoa: Captured cursor mode not yet implemented");
|
||||
}
|
||||
|
||||
if (_glfwWindowFocusedCocoa(window))
|
||||
updateCursorMode(window);
|
||||
|
||||
} // autoreleasepool
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user