cec: also send 'image view on' before setting the active source
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 13 Feb 2012 19:21:20 +0000 (20:21 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 13 Feb 2012 19:21:20 +0000 (20:21 +0100)
src/lib/CECProcessor.cpp
src/lib/implementations/SLCommandHandler.cpp

index 5a70d242553957ed20ee6059b2b33eb95fd01ca8..0ea5e8adb36c403cbb59e6c0a48bf1dc92245f7a 100644 (file)
@@ -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)
     {
index c9d51ba297de5e4b7a9e50007756c2487e2034dc..b6b55ae84a101f7bf599d323f2e09bddc664ff9b 100644 (file)
@@ -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();
     }