From 7af33af4823a6610efe69fdaa24cbfdf528ad413 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 21 Nov 2012 23:49:59 +0100 Subject: [PATCH] rcinput: add ugly hack for azbox rc Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e0282a053731dc7545243e961ef5c12afcbdcd21 Author: Stefan Seyfried Date: 2012-11-21 (Wed, 21 Nov 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/rcinput.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 6876fbafe..805db400e 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1586,8 +1586,25 @@ const char *CRCInput::getKeyNameC(const unsigned int key) **************************************************************************/ int CRCInput::translate(int code, int /*num*/) { - if(code == 0x100) code = RC_up; - else if(code == 0x101) code = RC_down; + switch(code) + { + case 0x100: + return RC_up; + case 0x101: + return RC_down; +#ifdef HAVE_AZBOX_HARDWARE + case KEY_HOME: + return RC_favorites; + case KEY_TV: + return RC_stop; + case KEY_RADIO: + return RC_record; + case KEY_PLAY: + return RC_pause; +#endif + default: + break; + } if ((code >= 0) && (code <= KEY_MAX)) return code; else