diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 35f86b8c7..e36df5b2d 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -19,6 +19,11 @@ #include #include +/* same as in rcinput.h... */ +#define KEY_TTTV KEY_FN_1 +#define KEY_TTZOOM KEY_FN_2 +#define KEY_REVEAL KEY_FN_D + extern cVideo * videoDecoder; static pthread_t ttx_sub_thread; @@ -6334,7 +6339,7 @@ void DecodePage() /****************************************************************************** * GetRCCode * ******************************************************************************/ -#if !HAVE_TRIPLEDRAGON +#if 1 int GetRCCode() { struct input_event ev; @@ -6378,7 +6383,17 @@ int GetRCCode() case KEY_VOLUMEUP: RCCode = RC_PLUS; break; case KEY_VOLUMEDOWN: RCCode = RC_MINUS; break; case KEY_MUTE: RCCode = RC_MUTE; break; +#if !HAVE_TRIPLEDRAGON + /* on CS, change transparent mode with TEXT key */ case KEY_TEXT: RCCode = RC_TEXT; break; +#else + /* on TD, cycle split screen mode with TTX key + * - the TD has a special key for transparent mode */ + case KEY_TEXT: RCCode = RC_MINUS; break; +#endif + case KEY_TTTV: RCCode = RC_MUTE; break; + case KEY_TTZOOM: RCCode = RC_PLUS; break; + case KEY_REVEAL: RCCode = RC_HELP; break; //case KEY_HELP: RCCode = RC_HELP; break; case KEY_INFO: RCCode = RC_HELP; break; case KEY_MENU: RCCode = RC_DBOX; break; @@ -6402,6 +6417,7 @@ printf("[tuxtxt] new key, code %X\n", RCCode); return 0; } #else +/* this is obsolete and can soon be removed */ int GetRCCode() { static unsigned short LastKey = -1; diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 8023573cd..cd6bf8676 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -62,14 +62,7 @@ #include //const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"}; -#if !HAVE_TRIPLEDRAGON const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"}; -#else -#include -#include -#include -const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/stb/tdremote"}; -#endif typedef struct input_event t_input_event; #ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL @@ -499,9 +492,7 @@ void CRCInput::getMsg_ms(neutrino_msg_t * msg, neutrino_msg_data_t * data, int T getMsg_us(msg, data, (uint64_t) Timeout * 1000, bAllowRepeatLR); } -#if !HAVE_TRIPLEDRAGON #define ENABLE_REPEAT_CHECK -#endif void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t Timeout, bool bAllowRepeatLR) { static uint64_t last_keypress = 0ULL; @@ -1156,24 +1147,11 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); for (int i = 0; i < NUMBER_OF_EVENT_DEVICES; i++) { if ((fd_rc[i] != -1) && (FD_ISSET(fd_rc[i], &rfds))) { -#ifdef HAVE_TRIPLEDRAGON - int count = 0; - /* clear the input queue and process only the latest event - hack to improve the behaviour of the TD remote - otherwise we lose key_up events due to CRCInput::clearRCMsg() */ - while (read(fd_rc[i], &ev.code, sizeof(ev.code)) == sizeof(ev.code)) - count++; - if (!count) - continue; - ev.value = ((ev.code & 0xff00) != 0x8000); /* 0x8000 is release bit */ - ev.code &= 0x00FF; /* clear release bit */ -#else int ret; ret = read(fd_rc[i], &ev, sizeof(t_input_event)); if(ret != sizeof(t_input_event)) continue; -#endif SHTDCNT::getInstance()->resetSleepTimer(); uint32_t trkey = translate(ev.code, i); #ifdef DEBUG @@ -1517,7 +1495,6 @@ std::string CRCInput::getKeyName(const unsigned int key) * transforms the rc-key to generic - internal use only! * **************************************************************************/ -#if !HAVE_TRIPLEDRAGON int CRCInput::translate(int code, int /*num*/) { if(code == 0x100) code = RC_up; @@ -1527,68 +1504,6 @@ int CRCInput::translate(int code, int /*num*/) else return RC_nokey; } -#else -int CRCInput::translate(int code, int) -{ - switch (code&0xFF) - { - case 0x01: return RC_standby; - case 0x02: return RC_1; - case 0x03: return RC_2; - case 0x04: return RC_3; - case 0x05: return RC_4; - case 0x06: return RC_5; - case 0x07: return RC_6; - case 0x08: return RC_timer; - case 0x09: return RC_7; - case 0x0a: return RC_8; - case 0x0b: return RC_9; - case 0x0c: return RC_zoomin; - case 0x0d: return RC_favorites; // blue heart - case 0x0e: return RC_0; -// case 0x0f: return RC_recall; // red hand - case 0x0f: return RC_next; // red hand. RC_next is used by neutrino for - // switching Panscan / letterbox - case 0x10: return RC_zoomout; - case 0x11: return RC_spkr; // MUTE - case 0x12: return RC_setup; // menu - case 0x13: return RC_epg; - case 0x14: return RC_help; // INFO - case 0x15: return RC_home; // EXIT - case 0x16: return RC_page_down; // vv - case 0x17: return RC_page_up; // ^^ - case 0x18: return RC_up; - case 0x19: return RC_left; - case 0x1a: return RC_ok; - case 0x1b: return RC_right; - case 0x1c: return RC_down; - case 0x1d: return RC_minus; - case 0x1e: return RC_plus; - case 0x1f: return RC_red; - case 0x20: return RC_green; - case 0x21: return RC_yellow; - case 0x22: return RC_blue; - case 0x23: return RC_tv; // TV/RADIO - case 0x24: return RC_video; // MP3/PVR - case 0x25: return RC_audio; // CD/DVD - case 0x26: return RC_aux; // AUX - case 0x27: return RC_text; // [=] - case 0x28: return RC_tttv; // [ /=] - case 0x29: return RC_ttzoom; // [=x=] - case 0x2a: return RC_ttreveal; // [=?] - case 0x2b: return RC_rewind; // << - case 0x2c: return RC_stop; // X - case 0x2d: return RC_pause; // ||> - case 0x2e: return RC_forward; // >> -// case 0x2f: return RC_prev; // |<< - case 0x30: return RC_eject; - case 0x31: return RC_record; -// case 0x32: return RC_next; // >>| - // RC_prev/next are abused by neutrino for videomode switch - } - return RC_nokey; -} -#endif void CRCInput::close_click() {