[PATCH evemu 2/2] Let printf handle the EV_SYN time delta's sign
Peter Hutterer
peter.hutterer at who-t.net
Thu Jun 1 02:09:06 UTC 2017
Related to https://bugs.freedesktop.org/show_bug.cgi?id=101150
For a negatice time delta (can happen on autoresume, see the bug) we end up
printing +-25ms. This patch doesn't fix the negative time delta but at least
switches it to just print -25ms.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evemu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/evemu.c b/src/evemu.c
index 8aa4070..0718e26 100644
--- a/src/evemu.c
+++ b/src/evemu.c
@@ -753,7 +753,7 @@ static int write_event_desc(FILE *fp, const struct input_event *ev)
time = millis(&ev->time);
dt = time - last_ms;
last_ms = time;
- rc = fprintf(fp, "# ------------ %s (%d) ---------- +%ldms\n",
+ rc = fprintf(fp, "# ------------ %s (%d) ---------- %+ldms\n",
libevdev_event_code_get_name(ev->type, ev->code),
ev->value,
dt);
--
2.13.0
More information about the Input-tools
mailing list