Transformed glfwEnable/Disable/SetCursorMode into glfwGetInputMode/SetInputMode.

This commit is contained in:
Camilla Berglund
2012-02-04 00:51:35 +01:00
parent 011ef7463a
commit ce288a8939
19 changed files with 219 additions and 279 deletions

View File

@@ -309,13 +309,13 @@ void mouse_button_callback(GLFWwindow window, int button, int action)
if (action == GLFW_PRESS)
{
glfwSetCursorMode(window, GLFW_CURSOR_CAPTURED);
glfwSetInputMode(window, GLFW_CURSOR_MODE, GLFW_CURSOR_CAPTURED);
locked = GL_TRUE;
}
else
{
locked = GL_FALSE;
glfwSetCursorMode(window, GLFW_CURSOR_NORMAL);
glfwSetInputMode(window, GLFW_CURSOR_MODE, GLFW_CURSOR_NORMAL);
}
}
@@ -396,7 +396,7 @@ int main(int argc, char* argv[])
// Keyboard handler
glfwSetKeyCallback(key_callback);
glfwEnable(window, GLFW_KEY_REPEAT);
glfwSetInputMode(window, GLFW_KEY_REPEAT, GL_TRUE);
// Window resize handler
glfwSetWindowSizeCallback(window_resize_callback);