Cleanup
Related to #1012.
diff --git a/src/window.c b/src/window.c
index 047b3e0..da40873 100644
--- a/src/window.c
+++ b/src/window.c
@@ -959,7 +959,6 @@
GLFWAPI double glfwGetEventTime(void)
{
_GLFW_REQUIRE_INIT_OR_RETURN(0.0);
-
return _glfwPlatformGetEventTime();
}
diff --git a/tests/events.c b/tests/events.c
index 7d3ce24..e29914a 100644
--- a/tests/events.c
+++ b/tests/events.c
@@ -269,8 +269,8 @@
static void window_pos_callback(GLFWwindow* window, int x, int y)
{
Slot* slot = glfwGetWindowUserPointer(window);
- printf("%08x to %i at %0.3f (event time: %0.3f): Window position: %i %i\n",
- counter++, slot->number, glfwGetTime(), glfwGetEventTime(), x, y);
+ printf("%08x to %i at %0.3f: Window position: %i %i\n",
+ counter++, slot->number, glfwGetTime(), x, y);
}
static void window_size_callback(GLFWwindow* window, int width, int height)
@@ -336,33 +336,35 @@
static void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
{
Slot* slot = glfwGetWindowUserPointer(window);
- printf("%08x to %i at %0.3f (event time: %0.3f): Mouse button %i (%s) (with%s) was %s\n",
- counter++, slot->number, glfwGetTime(), glfwGetEventTime(), button,
+ printf("%08x to %i at %0.3f: Mouse button %i (%s) (with%s) was %s at %0.3f\n",
+ counter++, slot->number, glfwGetTime(), button,
get_button_name(button),
get_mods_name(mods),
- get_action_name(action));
+ get_action_name(action),
+ glfwGetEventTime());
}
static void cursor_position_callback(GLFWwindow* window, double x, double y)
{
Slot* slot = glfwGetWindowUserPointer(window);
- printf("%08x to %i at %0.3f (event time: %0.3f): Cursor position: %f %f\n",
- counter++, slot->number, glfwGetTime(), glfwGetEventTime(), x, y);
+ printf("%08x to %i at %0.3f: Cursor position: %f %f at %0.3f\n",
+ counter++, slot->number, glfwGetTime(), x, y, glfwGetEventTime());
}
static void cursor_enter_callback(GLFWwindow* window, int entered)
{
Slot* slot = glfwGetWindowUserPointer(window);
- printf("%08x to %i at %0.3f: Cursor %s window\n",
+ printf("%08x to %i at %0.3f: Cursor %s window at %0.3f\n",
counter++, slot->number, glfwGetTime(),
- entered ? "entered" : "left");
+ entered ? "entered" : "left",
+ glfwGetEventTime());
}
static void scroll_callback(GLFWwindow* window, double x, double y)
{
Slot* slot = glfwGetWindowUserPointer(window);
- printf("%08x to %i at %0.3f: Scroll: %0.3f %0.3f\n",
- counter++, slot->number, glfwGetTime(), x, y);
+ printf("%08x to %i at %0.3f: Scroll: %0.3f %0.3f at %0.3f\n",
+ counter++, slot->number, glfwGetTime(), x, y, glfwGetEventTime());
}
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
@@ -372,20 +374,22 @@
if (name)
{
- printf("%08x to %i at %0.3f (event time: %0.3f): Key 0x%04x Scancode 0x%04x (%s) (%s) (with%s) was %s\n",
- counter++, slot->number, glfwGetTime(), glfwGetEventTime(), key, scancode,
+ printf("%08x to %i at %0.3f: Key 0x%04x Scancode 0x%04x (%s) (%s) (with%s) was %s at %0.3f\n",
+ counter++, slot->number, glfwGetTime(), key, scancode,
get_key_name(key),
name,
get_mods_name(mods),
- get_action_name(action));
+ get_action_name(action),
+ glfwGetEventTime());
}
else
{
- printf("%08x to %i at %0.3f (event time: %0.3f): Key 0x%04x Scancode 0x%04x (%s) (with%s) was %s\n",
- counter++, slot->number, glfwGetTime(), glfwGetEventTime(), key, scancode,
+ printf("%08x to %i at %0.3f: Key 0x%04x Scancode 0x%04x (%s) (with%s) was %s at %0.3f\n",
+ counter++, slot->number, glfwGetTime(), key, scancode,
get_key_name(key),
get_mods_name(mods),
- get_action_name(action));
+ get_action_name(action),
+ glfwGetEventTime());
}
if (action != GLFW_PRESS)
@@ -406,8 +410,8 @@
static void char_callback(GLFWwindow* window, unsigned int codepoint)
{
Slot* slot = glfwGetWindowUserPointer(window);
- printf("%08x to %i at %0.3f (event time: %0.3f): Character 0x%08x (%s) input\n",
- counter++, slot->number, glfwGetTime(), glfwGetEventTime(), codepoint,
+ printf("%08x to %i at %0.3f: Character 0x%08x (%s) input\n",
+ counter++, slot->number, glfwGetTime(), codepoint,
get_character_string(codepoint));
}