mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 12:18:51 -05:00
Added drop reporting to events test.
This commit is contained in:
parent
cd54dc84c4
commit
ed4c8b27f1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user