mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
Revert "libstb-hal: Fix compatibility issues with struct input_event time assignment"
This reverts commit 9183928d85
.
This commit is contained in:
@@ -790,41 +790,12 @@ void hdmi_cec::rc_sync(int fd)
|
||||
{
|
||||
struct input_event ev;
|
||||
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
// Depending on the structure definition in input.h, assign the time values
|
||||
#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__)
|
||||
ev.time.tv_sec = tv.tv_sec;
|
||||
ev.time.tv_usec = tv.tv_usec;
|
||||
#else
|
||||
ev.__sec = tv.tv_sec;
|
||||
ev.__usec = tv.tv_usec;
|
||||
#endif
|
||||
|
||||
gettimeofday(&ev.time, NULL);
|
||||
ev.type = EV_SYN;
|
||||
ev.code = SYN_REPORT;
|
||||
ev.value = 0;
|
||||
|
||||
ssize_t bytes_written = write(fd, &ev, sizeof(ev));
|
||||
|
||||
// Debugging information
|
||||
if (bytes_written != sizeof(ev))
|
||||
{
|
||||
hal_info(RED "[CEC] Error writing sync event to device\n" NORMAL);
|
||||
write(fd, &ev, sizeof(ev));
|
||||
}
|
||||
else
|
||||
{
|
||||
hal_info(GREEN "[CEC] Sync event written successfully\n" NORMAL);
|
||||
|
||||
#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__)
|
||||
hal_info(GREEN "[CEC] Event time: %ld.%06ld\n" NORMAL, ev.time.tv_sec, ev.time.tv_usec);
|
||||
#else
|
||||
hal_info(GREEN "[CEC] Event time: %ld.%06ld\n" NORMAL, ev.__sec, ev.__usec);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void hdmi_cec::send_key(unsigned char key, unsigned char destination)
|
||||
{
|
||||
|
Reference in New Issue
Block a user