Add min/max corner placement to cursor test

Related to #1461.
master
Camilla Löwy ago%!(EXTRA string=6 years) committed by Camilla Löwy
parent 5f4e66b21a
commit 62d296992e
  1. 14
      tests/cursor.c

@ -251,6 +251,20 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
break;
}
case GLFW_KEY_UP:
glfwSetCursorPos(window, 0, 0);
glfwGetCursorPos(window, &cursor_x, &cursor_y);
break;
case GLFW_KEY_DOWN:
{
int width, height;
glfwGetWindowSize(window, &width, &height);
glfwSetCursorPos(window, width - 1, height - 1);
glfwGetCursorPos(window, &cursor_x, &cursor_y);
break;
}
case GLFW_KEY_0:
glfwSetCursor(window, NULL);
break;

Loading…
Cancel
Save