Merge branch 'tuxbox-fixed'

This commit is contained in:
Stefan Seyfried
2017-02-22 20:06:27 +01:00
3 changed files with 5 additions and 9 deletions

View File

@@ -1344,9 +1344,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
} }
uint32_t trkey = translate(ev.code); uint32_t trkey = translate(ev.code);
#ifdef _DEBUG
printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str()); printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str());
#endif
if (trkey == RC_nokey) if (trkey == RC_nokey)
continue; continue;
@@ -1380,9 +1378,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
} }
if (ev.value) { if (ev.value) {
#ifdef RCDEBUG d_printf("rc_last_key %04x rc_last_repeat_key %04x\n\n", rc_last_key, rc_last_repeat_key);
printf("rc_last_key %04x rc_last_repeat_key %04x\n\n", rc_last_key, rc_last_repeat_key);
#endif
bool keyok = true; bool keyok = true;
#if 0 #if 0
uint64_t now_pressed; uint64_t now_pressed;
@@ -1735,7 +1731,7 @@ void CRCInput::setKeyRepeatDelay(unsigned int start_ms, unsigned int repeat_ms)
std::string path = (*it).path; std::string path = (*it).path;
if (path == "/tmp/neutrino.input") if (path == "/tmp/neutrino.input")
continue; /* setting repeat rate does not work here */ continue; /* setting repeat rate does not work here */
#ifdef HAVE_COOL_HARDWARE #ifdef BOXMODEL_CS_HD1
/* this is ugly, but the driver does not support anything advanced... */ /* this is ugly, but the driver does not support anything advanced... */
if (path == "/dev/input/nevis_ir") { if (path == "/dev/input/nevis_ir") {
d_printf("[rcinput:%s] %s(fd %d) using proprietary ioctl\n", __func__, path.c_str(), fd); d_printf("[rcinput:%s] %s(fd %d) using proprietary ioctl\n", __func__, path.c_str(), fd);

View File

@@ -885,8 +885,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
#if 0 #if 0
int evd = open(EVENTDEV, O_RDWR); int evd = open(EVENTDEV, O_RDWR);
if (evd < 0) { if (evd < 0) {
perror("opening " EVENTDEV " failed");
hh->SendError(); hh->SendError();
perror("opening event0 failed");
return; return;
} }
if (rc_send(evd, sendcode, KEY_PRESSED) < 0) { if (rc_send(evd, sendcode, KEY_PRESSED) < 0) {
@@ -897,8 +897,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh)
} }
if (rc_send(evd, sendcode, KEY_RELEASED) < 0) { if (rc_send(evd, sendcode, KEY_RELEASED) < 0) {
perror("writing 'KEY_RELEASED' event failed"); perror("writing 'KEY_RELEASED' event failed");
close(evd);
hh->SendError(); hh->SendError();
close(evd);
return; return;
} }
close(evd); close(evd);

View File

@@ -222,7 +222,7 @@ int main (int argc, char **argv){
#if defined (EVENTDEV) #if defined (EVENTDEV)
evd=open (EVENTDEV,O_RDWR); evd=open (EVENTDEV,O_RDWR);
if (evd<0){ if (evd<0){
perror ("opening event0 failed"); perror ("opening " EVENTDEV " failed");
return 1; return 1;
} }
#else #else