From 44d3e0b7194a9fa97ed58a4c437c168749b8c58c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 19 Jan 2020 22:34:01 +0000 Subject: user/mtdev: Fix input_event code for time64 compatibility --- user/mtdev/time64.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 user/mtdev/time64.patch (limited to 'user/mtdev/time64.patch') diff --git a/user/mtdev/time64.patch b/user/mtdev/time64.patch new file mode 100644 index 000000000..248599d6f --- /dev/null +++ b/user/mtdev/time64.patch @@ -0,0 +1,23 @@ +--- mtdev-1.1.5/src/core.c.old 2013-07-25 07:57:40.000000000 +0000 ++++ mtdev-1.1.5/src/core.c 2020-01-19 19:25:23.141061642 +0000 +@@ -251,7 +251,8 @@ + count++; + if (!count) + return; +- ev.time = syn->time; ++ ev.input_event_sec = syn->input_event_sec; ++ ev.input_event_usec = syn->input_event_usec; + ev.type = EV_ABS; + ev.code = ABS_MT_SLOT; + ev.value = slot; +--- mtdev-1.1.5/test/mtdev-test.c.old 2014-02-28 18:48:23.000000000 +0000 ++++ mtdev-1.1.5/test/mtdev-test.c 2020-01-19 19:26:02.526687670 +0000 +@@ -47,7 +47,7 @@ + { + static const mstime_t ms = 1000; + static int slot; +- mstime_t evtime = ev->time.tv_usec / ms + ev->time.tv_sec * ms; ++ mstime_t evtime = ev->input_event_usec / ms + ev->input_event_sec * ms; + if (ev->type == EV_ABS && ev->code == ABS_MT_SLOT) + slot = ev->value; + fprintf(stderr, "%012llx %02d %01d %04x %d\n", -- cgit v1.2.3-70-g09d2