From ed4c8b27f1a748153cecf426e7566954b10f4b57 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 22 Dec 2013 16:50:01 +0100 Subject: [PATCH] Added drop reporting to events test. --- tests/events.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/events.c b/tests/events.c index 7ac69c8e..d5e2ce49 100644 --- a/tests/events.c +++ b/tests/events.c @@ -381,6 +381,14 @@ static void char_callback(GLFWwindow* window, unsigned int codepoint) get_character_string(codepoint)); } +static void drop_callback(GLFWwindow* window, const char* descriptor) +{ + printf("%08x at %0.3f: Drop of \"%s\" input\n", + counter++, + glfwGetTime(), + descriptor); +} + void monitor_callback(GLFWmonitor* monitor, int event) { if (event == GLFW_CONNECTED) @@ -457,6 +465,7 @@ int main(int argc, char** argv) glfwSetScrollCallback(window, scroll_callback); glfwSetKeyCallback(window, key_callback); glfwSetCharCallback(window, char_callback); + glfwSetDropCallback(window, drop_callback); glfwMakeContextCurrent(window); glfwSwapInterval(1);