mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
Add raw input toggle key to cursor example
This commit is contained in:
parent
b51f5df076
commit
86544e7c3a
@ -163,6 +163,19 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
||||
printf("(( cursor is hidden ))\n");
|
||||
break;
|
||||
|
||||
case GLFW_KEY_R:
|
||||
if (glfwGetWindowUseRawInput(window))
|
||||
{
|
||||
glfwSetWindowUseRawInput(window, GLFW_FALSE);
|
||||
printf("(( raw input is disabled ))\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
glfwSetWindowUseRawInput(window, GLFW_TRUE);
|
||||
printf("(( raw input is enabled ))\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case GLFW_KEY_SPACE:
|
||||
swap_interval = 1 - swap_interval;
|
||||
printf("(( swap interval: %i ))\n", swap_interval);
|
||||
|
Loading…
Reference in New Issue
Block a user