diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 956a96216..365977198 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL @@ -1338,7 +1339,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 * Everything would be much easier if we could use the post-kernel 3.4 * EVIOCSCLOCKID ioctl :-) */ struct timespec t1; - now_pressed = ev.time.tv_usec + ev.time.tv_sec * 1000000ULL; + now_pressed = ev.input_event_sec * 1000000ULL + ev.input_event_usec; if (!clock_gettime(CLOCK_MONOTONIC, &t1)) { struct timeval t2; gettimeofday(&t2, NULL);