mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 18:26:39 +02:00
Map keyboard buttons and mouse controls to a gamepad. https://github.com/AntiMicroX/antimicrox
29 lines
1 KiB
Diff
29 lines
1 KiB
Diff
Thanks to https://github.com/void-linux/void-packages/blob/16fe2cd425e5d629341549960018d91812380747/srcpkgs/antimicrox/patches/time64.patch
|
|
fix build in armhf/armv7/x86
|
|
--- a/src/eventhandlers/uinputeventhandler.cpp 2024-05-29 09:54:07.142960160 +0100
|
|
+++ b/src/eventhandlers/uinputeventhandler.cpp 2024-05-29 09:58:41.351964751 +0100
|
|
@@ -441,9 +441,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;
|
|
@@ -453,7 +456,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;
|