From: Lars Op den Kamp Date: Mon, 13 Feb 2012 19:21:20 +0000 (+0100) Subject: cec: also send 'image view on' before setting the active source X-Git-Tag: upstream/2.2.0~1^2~35^2~69 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=73bbe00fe9228e6a249a3d3b950a00639e0ed647 cec: also send 'image view on' before setting the active source --- 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(); }