From: Lars Op den Kamp Date: Tue, 19 Jun 2012 15:19:53 +0000 (+0200) Subject: cec: fixed - get the current power status of the TV when activating the source on... X-Git-Tag: upstream/2.2.0~1^2~22^2^2~41 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e8a6f887fc695bbde208eac774ca1366436fa06c;p=deb_libcec.git cec: fixed - get the current power status of the TV when activating the source on panasonic, not the cached power status. fixes active source messages not being sent, or being delayed --- diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index 455a062..664de21 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -124,8 +124,7 @@ bool CVLCommandHandler::TransmitActiveSource(const cec_logical_address iInitiato else { // transmit standard active source message - return CCECCommandHandler::TransmitActiveSource(iInitiator, iPhysicalAddress) && - TransmitMenuState(iInitiator, CECDEVICE_TV, CEC_MENU_STATE_ACTIVATED); + return CCECCommandHandler::TransmitActiveSource(iInitiator, iPhysicalAddress); } } @@ -155,7 +154,11 @@ bool CVLCommandHandler::PowerUpEventReceived(void) return true; } - cec_power_status powerStatus = m_busDevice->GetCurrentPowerStatus(); + cec_logical_address sourceLA = m_busDevice->GetLogicalAddress(); + if (sourceLA == CECDEVICE_TV) + sourceLA = m_processor->GetPrimaryDevice()->GetLogicalAddress(); + + cec_power_status powerStatus = m_busDevice->GetPowerStatus(sourceLA); CLockObject lock(m_mutex); m_bPowerUpEventReceived = (powerStatus == CEC_POWER_STATUS_ON);