void-packages/srcpkgs/antimicrox/patches/time64.patch

28 lines
879 B
Diff

--- a/src/eventhandlers/uinputeventhandler.cpp 2020-10-02 09:51:36.000000000 +0200
+++ b/src/eventhandlers/uinputeventhandler.cpp 2020-12-06 10:17:47.922175141 +0100
@@ -498,9 +498,12 @@
{
struct input_event ev;
struct input_event ev2;
+ struct timeval tv;
memset(&ev, 0, sizeof(struct input_event));
- gettimeofday(&ev.time, nullptr);
+ gettimeofday(&tv, nullptr);
+ ev.input_event_sec = tv.tv_sec;
+ ev.input_event_usec = tv.tv_usec;
ev.type = type;
ev.code = code;
ev.value = value;
@@ -510,7 +513,9 @@
if (syn)
{
memset(&ev2, 0, sizeof(struct input_event));
- gettimeofday(&ev2.time, nullptr);
+ gettimeofday(&tv, nullptr);
+ ev2.input_event_sec = tv.tv_sec;
+ ev2.input_event_usec = tv.tv_usec;
ev2.type = EV_SYN;
ev2.code = SYN_REPORT;
ev2.value = 0;