mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
add revert translate to webif rc
Origin commit data
------------------
Branch: ni/coolstream
Commit: f336d4b471
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2018-01-22 (Mon, 22 Jan 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -890,6 +890,36 @@ void CControlAPI::RebootCGI(CyhookHandler *hh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
unsigned int revert_translate(unsigned int code)
|
||||||
|
{
|
||||||
|
switch(code)
|
||||||
|
{
|
||||||
|
case RC_play:
|
||||||
|
return KEY_PLAYPAUSE;
|
||||||
|
case RC_page_up:
|
||||||
|
return KEY_CHANNELUP;
|
||||||
|
case RC_page_down:
|
||||||
|
return KEY_CHANNELDOWN;
|
||||||
|
#ifdef HAVE_ARM_HARDWARE
|
||||||
|
case RC_favorites:
|
||||||
|
return KEY_VIDEO;
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_AZBOX_HARDWARE
|
||||||
|
case RC_favorites:
|
||||||
|
return KEY_HOME;
|
||||||
|
case RC_stop:
|
||||||
|
return KEY_TV;
|
||||||
|
case RC_record:
|
||||||
|
return KEY_RADIO;
|
||||||
|
case RC_pause:
|
||||||
|
return KEY_PLAY;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return code;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void dev_uinput_sync(int fd) {
|
void dev_uinput_sync(int fd) {
|
||||||
struct input_event ev;
|
struct input_event ev;
|
||||||
@@ -948,6 +978,7 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
|
|||||||
hh->SendError();
|
hh->SendError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
sendcode = revert_translate(sendcode);
|
||||||
if (rc_send(evd, sendcode, KEY_PRESSED) < 0) {
|
if (rc_send(evd, sendcode, KEY_PRESSED) < 0) {
|
||||||
perror("writing 'KEY_PRESSED' event failed");
|
perror("writing 'KEY_PRESSED' event failed");
|
||||||
hh->SendError();
|
hh->SendError();
|
||||||
|
Reference in New Issue
Block a user