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:
Camilla Löwy
2019-12-03 17:58:20 +01:00
committed by Camilla Löwy
parent a46f829de8
commit 488008e0a2
11 changed files with 119 additions and 8 deletions
+8
View File
@@ -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
}