From 686740b9ac3e6f19a0386ddf1ac1dbf2ef7c9a91 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 13 Feb 2012 14:44:42 +0100 Subject: [PATCH] cec: replace the handler for the primary device directly after setting the type to LG --- src/lib/devices/CECBusDevice.h | 2 +- src/lib/implementations/SLCommandHandler.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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) -- 2.34.1