Revert "cec: use CCECCommandHandler::ActivateSource() instead of TransmitActiveSource...
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 3 Jan 2012 15:08:36 +0000 (16:08 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 3 Jan 2012 15:08:36 +0000 (16:08 +0100)
This reverts commit f26ea36763c4e7cca87a128e87326670699700da.

src/lib/CECProcessor.cpp
src/lib/implementations/CECCommandHandler.cpp

index 2ec895a403fccdee1172b5cd09c9dfa2493077a5..e0a32a8c0d26e7646396d3146ee768c48684a52c 100644 (file)
@@ -417,7 +417,16 @@ 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]->GetHandler()->ActivateSource();
+  {
+    bReturn = m_busDevices[addr]->TransmitActiveSource();
+
+    if (bReturn && (m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE ||
+        m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) &&
+        m_busDevices[addr]->GetHandler()->SendDeckStatusUpdateOnActiveSource())
+    {
+      bReturn = ((CCECPlaybackDevice *)m_busDevices[addr])->TransmitDeckStatus(CECDEVICE_TV);
+    }
+  }
 
   return bReturn;
 }
index 1773507f54087ecdb516c04999a1c0e40d4b0111..9f442be160d6ebf52711cc507c15e932dbb791f7 100644 (file)
@@ -988,11 +988,6 @@ bool CCECCommandHandler::ActivateSource(void)
     primary->SetPowerStatus(CEC_POWER_STATUS_ON);
     primary->SetMenuState(CEC_MENU_STATE_ACTIVATED);
 
-    if ((m_busDevice->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE ||
-        m_busDevice->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) &&
-        SendDeckStatusUpdateOnActiveSource())
-      ((CCECPlaybackDevice *)m_busDevice)->TransmitDeckStatus(CECDEVICE_TV);
-
     if (m_processor->GetPrimaryDevice()->GetPhysicalAddress(false) != 0xffff)
     {
       m_processor->SetActiveSource();