cec: only switch handlers once when using the generic handler
[deb_libcec.git] / src / lib / implementations / SLCommandHandler.cpp
index bc302aa8092bad94ee81de56682d9a48b130130a..7a357d319f7d003c5ab086f191448c460016006a 100644 (file)
@@ -54,11 +54,12 @@ CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) :
     m_bSLEnabled(false),
     m_bPowerStateReset(false)
 {
+  m_vendorId = CEC_VENDOR_LG;
   CCECBusDevice *primary = m_processor->GetPrimaryDevice();
 
   /* imitate LG devices */
   if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
-    primary->SetVendorId(CEC_VENDOR_LG, false);
+    primary->SetVendorId(CEC_VENDOR_LG);
   SetLGDeckStatus();
 
   /* LG TVs don't always reply to CEC version requests, so just set it to 1.3a */
@@ -105,6 +106,14 @@ bool CSLCommandHandler::InitHandler(void)
   return true;
 }
 
+bool CSLCommandHandler::ActivateSource(void)
+{
+  CCECBusDevice *primary = m_processor->GetPrimaryDevice();
+  primary->SetActiveSource();
+  primary->TransmitActiveSource();
+  return true;
+}
+
 bool CSLCommandHandler::HandleActiveSource(const cec_command &command)
 {
   if (command.parameters.size == 2)