X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FVLCommandHandler.cpp;h=65f6c157cf7dec6fa36f097bc7e040ead1d7d853;hb=d78e4e6f492d94f613dd4577b9fedc53c5a53a0d;hp=455a062d56811f503b49df407cfead656691e0c5;hpb=91ef4e2d039e2b4171cfb77f7895bde87c5309a6;p=deb_libcec.git diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index 455a062..65f6c15 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -76,7 +76,7 @@ bool CVLCommandHandler::InitHandler(void) return CCECCommandHandler::InitHandler(); } -bool CVLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &command) +int CVLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &command) { if (command.initiator == CECDEVICE_TV && command.destination == CECDEVICE_BROADCAST && @@ -96,7 +96,7 @@ bool CVLCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &comma else if (command.parameters.At(4) == VL_POWERED_DOWN) LIB_CEC->AddLog(CEC_LOG_DEBUG, "unknown vendor command"); - return true; + return COMMAND_HANDLED; } return CCECCommandHandler::HandleDeviceVendorCommandWithId(command); @@ -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);