diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 55922c8a8..40cbed62a 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -61,8 +61,13 @@ #include #include -//const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"}; +#if HAVE_SPARK_HARDWARE +/* this relies on event0 being the AOTOM frontpanel driver device + * TODO: what if another input device is present? */ +const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"}; +#else const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"}; +#endif typedef struct input_event t_input_event; #ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL @@ -1155,6 +1160,8 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); if(ret != sizeof(t_input_event)) continue; + if (ev.type == EV_SYN) + continue; /* ignore... */ SHTDCNT::getInstance()->resetSleepTimer(); uint32_t trkey = translate(ev.code, i); #ifdef _DEBUG diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index 981a878bf..d1e259295 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -137,7 +137,11 @@ class CRCInput int fd_pipe_high_priority[2]; int fd_pipe_low_priority[2]; int fd_gamerc; +#ifdef HAVE_SPARK_HARDWARE +#define NUMBER_OF_EVENT_DEVICES 2 +#else #define NUMBER_OF_EVENT_DEVICES 1 +#endif int fd_rc[NUMBER_OF_EVENT_DEVICES]; int fd_keyb; int fd_event;