mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Transformed glfwEnable/Disable/SetCursorMode into glfwGetInputMode/SetInputMode.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user