From 6bdd2306a7b320f2725ccf9044dce340af9b7252 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 3 Oct 2019 01:26:26 +0200 Subject: [PATCH] controlapi: add rc fallback device Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/50321a1af4077e7d1c7388d5576e069d89a0603c Author: vanhofen Date: 2019-10-03 (Thu, 03 Oct 2019) Origin message was: ------------------ - controlapi: add rc fallback device ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/controlapi.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index cc753294d..b3d074ddb 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -69,6 +69,7 @@ extern CBouquetManager *g_bouquetManager; #else #define RC_DEVICE "/dev/input/event1" #endif +#define RC_DEVICE_FALLBACK "/dev/input/event0" //----------------------------------------------------------------------------- //============================================================================= @@ -982,6 +983,8 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) #endif #if 1 int evd = open(RC_DEVICE, O_RDWR); + if (evd < 0) + evd = open(RC_DEVICE_FALLBACK, O_RDWR); if (evd < 0) { perror("opening " RC_DEVICE " failed"); hh->SendError();