cec: show a notification when the cec adapter was plugged in but libcec support...
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 17 Oct 2011 21:12:20 +0000 (23:12 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 17 Oct 2011 21:12:20 +0000 (23:12 +0200)
language/English/strings.xml
xbmc/peripherals/Peripherals.cpp

index fb23c27..6ad013f 100644 (file)
   <string id="36014">Put this PC in standby mode when the TV is switched off</string>
   <string id="36015">HDMI port number</string>
   <string id="36016">XBMC connected</string>
+  <string id="36017">Adapter found, but libcec is not available</string>
 </strings>
index cf17654..e9d84be 100644 (file)
@@ -259,11 +259,14 @@ CPeripheral *CPeripherals::CreatePeripheral(CPeripheralBus &bus, const Periphera
     peripheral = new CPeripheralBluetooth(type, bus.Type(), strLocation, strDeviceName, iVendorId, iProductId);
     break;
 
-#if defined(HAVE_LIBCEC)
   case PERIPHERAL_CEC:
+#if defined(HAVE_LIBCEC)
     peripheral = new CPeripheralCecAdapter(type, bus.Type(), strLocation, strDeviceName, iVendorId, iProductId);
-    break;
+#else
+    CLog::Log(LOGWARNING, "%s - libCEC support has not been compiled in, so the CEC adapter cannot be used.", __FUNCTION__);
+    CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(36000), g_localizeStrings.Get(36017));
 #endif
+    break;
 
   default:
     break;