From 69936c59aa6d506c14f373e4d4f3f70248eec81a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 16 Sep 2022 23:29:29 +0200 Subject: [PATCH] controlapi: fix and simplify RC_DEVICE defines Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0e32e5562ddfa44577b346374deabe1ddbe95bc4 Author: vanhofen Date: 2022-09-16 (Fri, 16 Sep 2022) Origin message was: ------------------ - controlapi: fix and simplify RC_DEVICE defines ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/controlapi.cpp | 35 ++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index dc2e86183..9bfa92435 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -66,13 +66,38 @@ extern CPlugins *g_Plugins;//for relodplugins extern CBouquetManager *g_bouquetManager; #if HAVE_CST_HARDWARE - #define RC_DEVICE "/dev/input/nevis_ir" -#elif BOXMODEL_H7 - #define RC_DEVICE "/dev/input/event2" -#else - #define RC_DEVICE "/dev/input/event1" +#ifndef RC_DEVICE +#define RC_DEVICE "/dev/input/nevis_ir" #endif +#ifndef RC_DEVICE_FALLBACK #define RC_DEVICE_FALLBACK "/dev/input/event0" +#endif + +#elif BOXMODEL_H7 +#ifndef RC_DEVICE +#define RC_DEVICE "/dev/input/event2" +#endif +#ifndef RC_DEVICE_FALLBACK +#define RC_DEVICE_FALLBACK "/dev/input/event1" +#endif + +#elif BOXMODEL_MULTIBOX || BOXMODEL_MULTIBOXSE || BOXMODEL_OSMIO4K || BOXMODEL_OSMIO4KPLUS +#ifndef RC_DEVICE +#define RC_DEVICE "/dev/input/event0" +#endif +#ifndef RC_DEVICE_FALLBACK +#define RC_DEVICE_FALLBACK "/dev/input/event1" +#endif + +#else +#ifndef RC_DEVICE +#define RC_DEVICE "/dev/input/event1" +#endif +#ifndef RC_DEVICE_FALLBACK +#define RC_DEVICE_FALLBACK "/dev/input/event0" +#endif + +#endif //----------------------------------------------------------------------------- //=============================================================================