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
+2 -1
View File
@@ -596,7 +596,8 @@ GLFWAPI void glfwSetInputMode(GLFWwindow* handle, int mode, int value)
{
if (value != GLFW_CURSOR_NORMAL &&
value != GLFW_CURSOR_HIDDEN &&
value != GLFW_CURSOR_DISABLED)
value != GLFW_CURSOR_DISABLED &&
value != GLFW_CURSOR_CAPTURED)
{
_glfwInputError(GLFW_INVALID_ENUM,
"Invalid cursor mode 0x%08X",