cec: replace the handler for the primary device directly after setting the type to LG
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 13 Feb 2012 13:44:42 +0000 (14:44 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 13 Feb 2012 13:46:48 +0000 (14:46 +0100)
src/lib/devices/CECBusDevice.h
src/lib/implementations/SLCommandHandler.cpp

index 16b6e089b60a6fd6ebbeafd1da2f4510b72f9b55..a4350da4bc7f93162d78fc0e5c2c682f7ae8e8ae 100644 (file)
@@ -109,7 +109,7 @@ namespace CEC
     virtual bool TransmitKeyRelease(bool bWait = true);
 
   protected:
-    bool ReplaceHandler(bool bInitHandler = true);
+    bool ReplaceHandler(bool bActivateSource = true);
     void MarkBusy(void);
     void MarkReady(void);
 
index e3259219b90141c611afb43dd1a9b9318da74eda..290a4876c45b99acf2a396bee02b74710fac1d82 100644 (file)
@@ -59,7 +59,10 @@ CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) :
 
   /* imitate LG devices */
   if (primary && m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
+  {
     primary->SetVendorId(CEC_VENDOR_LG);
+    primary->ReplaceHandler(false);
+  }
 
   /* LG TVs don't always reply to CEC version requests, so just set it to 1.3a */
   if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)