From: Lars Op den Kamp Date: Tue, 3 Jan 2012 14:30:17 +0000 (+0100) Subject: cec: use CCECCommandHandler::ActivateSource() instead of TransmitActiveSource() in... X-Git-Tag: upstream/2.2.0~1^2~42^2~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f26ea36763c4e7cca87a128e87326670699700da;p=deb_libcec.git cec: use CCECCommandHandler::ActivateSource() instead of TransmitActiveSource() in CCECProcessor::SetActiveSource() --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index dd7b2fe..bcaea35 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -417,16 +417,7 @@ 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(); - - 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); - } - } + bReturn = m_busDevices[addr]->GetHandler()->ActivateSource(); return bReturn; } diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 9f442be..1773507 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -988,6 +988,11 @@ 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();