From e8a6f887fc695bbde208eac774ca1366436fa06c Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Tue, 19 Jun 2012 17:19:53 +0200 Subject: [PATCH] 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 --- src/lib/implementations/VLCommandHandler.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); -- 2.34.1