Add min/max corner placement to cursor test

Related to #1461.
This commit is contained in:
Camilla Löwy 2019-04-10 21:13:55 +02:00 committed by Camilla Löwy
parent 5f4e66b21a
commit 62d296992e

View File

@ -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;