From 73bbe00fe9228e6a249a3d3b950a00639e0ed647 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 13 Feb 2012 20:21:20 +0100 Subject: [PATCH] cec: also send 'image view on' before setting the active source --- src/lib/CECProcessor.cpp | 3 ++- src/lib/implementations/SLCommandHandler.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 5a70d24..0ea5e8a 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -459,7 +459,8 @@ bool CCECProcessor::SetActiveSource(cec_device_type type /* = CEC_DEVICE_TYPE_RE m_busDevices[addr]->SetActiveSource(); if (m_busDevices[addr]->GetPhysicalAddress(false) != 0xFFFF) { - bReturn = m_busDevices[addr]->TransmitActiveSource(); + bReturn = m_busDevices[addr]->TransmitImageViewOn() && + m_busDevices[addr]->TransmitActiveSource(); if (bReturn) { diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index c9d51ba..b6b55ae 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -117,6 +117,7 @@ bool CSLCommandHandler::ActivateSource(void) CCECBusDevice *primary = m_processor->GetPrimaryDevice(); primary->SetActiveSource(); + primary->TransmitImageViewOn(); primary->TransmitActiveSource(); return true; } @@ -126,7 +127,7 @@ bool CSLCommandHandler::HandleActiveSource(const cec_command &command) if (command.parameters.size == 2) { uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]); - if (iAddress != m_busDevice->GetPhysicalAddress(false)) + if (iAddress != m_processor->GetPrimaryDevice()->GetPhysicalAddress(false)) { ResetSLState(); } -- 2.34.1