From: Lars Op den Kamp Date: Tue, 3 Jan 2012 15:08:36 +0000 (+0100) Subject: Revert "cec: use CCECCommandHandler::ActivateSource() instead of TransmitActiveSource... X-Git-Tag: upstream/2.2.0~1^2~42^2~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e046c7bff238e90b4080f0604c00a45340b0b68c;p=deb_libcec.git Revert "cec: use CCECCommandHandler::ActivateSource() instead of TransmitActiveSource() in CCECProcessor::SetActiveSource()" This reverts commit f26ea36763c4e7cca87a128e87326670699700da. --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 2ec895a..e0a32a8 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -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; } diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 1773507..9f442be 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -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();