From: Lars Op den Kamp Date: Mon, 13 Feb 2012 13:44:42 +0000 (+0100) Subject: cec: replace the handler for the primary device directly after setting the type to LG X-Git-Tag: upstream/2.2.0~1^2~35^2~75 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=686740b9ac3e6f19a0386ddf1ac1dbf2ef7c9a91;p=deb_libcec.git cec: replace the handler for the primary device directly after setting the type to LG --- diff --git a/src/lib/devices/CECBusDevice.h b/src/lib/devices/CECBusDevice.h index 16b6e08..a4350da 100644 --- a/src/lib/devices/CECBusDevice.h +++ b/src/lib/devices/CECBusDevice.h @@ -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); diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index e325921..290a487 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -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)