From 211ed924738b53d0aa1367545a247f6d124f8350 Mon Sep 17 00:00:00 2001 From: seife Date: Wed, 18 Jan 2012 19:41:07 +0000 Subject: [PATCH] neutrino: also disable RCU selection menu when nevis_ir include is not present git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2068 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/keybind_setup.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 4587b47d7..abb70d9b9 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -33,6 +33,19 @@ #include #endif +#ifdef HAVE_COOLSTREAM_NEVIS_IR_H +/* define constants instead of #ifdef'ing the corresponding code. + * the compiler will optimize it away anyway, but the syntax is + * still checked */ +#define RC_HW_SELECT true +#else +#define RC_HW_SELECT false +#ifdef HAVE_COOL_HARDWARE +#warning header coolstream/nevis_ir.h not found +#warning you probably have an old driver installation +#warning you´ll be missing the remotecontrol selection feature! +#endif +#endif #include "gui/keybind_setup.h" @@ -218,7 +231,8 @@ int CKeybindSetup::showKeySetup() keySetupNotifier->changeNotify(NONEXISTANT_LOCALE, NULL); keySettings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_KEYBINDINGMENU_RC)); - keySettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true)); + if (RC_HW_SELECT) + keySettings->addItem(new CMenuOptionChooser(LOCALE_KEYBINDINGMENU_REMOTECONTROL_HARDWARE, &g_settings.remote_control_hardware, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTIONS, KEYBINDINGMENU_REMOTECONTROL_HARDWARE_OPTION_COUNT, true)); keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, keySettings_repeatBlocker)); keySettings->addItem(new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, keySettings_repeat_genericblocker));