1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Author: Andreas Beckmann <anbe@debian.org>
Description: work around struct input_event.time kernel api change
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
--- a/InputEvent.hpp
+++ b/InputEvent.hpp
@@ -20,7 +20,9 @@ namespace evdevPlus {
public:
input_event event{};
+#if 0
timeval &Time = event.time;
+#endif
uint16_t &Type = event.type;
uint16_t &Code = event.code;
int32_t &Value = event.value;
@@ -37,7 +39,10 @@ namespace evdevPlus {
Value = value;
if (time)
- memcpy(&event.time, time, sizeof(timeval));
+ {
+ event.input_event_sec = time->tv_sec;
+ event.input_event_usec = time->tv_usec;
+ }
}
friend void swap(InputEvent &first, InputEvent &second) {
|