X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=ef8a8f28f789c160839608641bfaa6b21ea3828b;hb=89a726faa6ffe9c02ce9d6452a9fe34e98d26037;hp=8d16a02fded9c611518c66207693ea95e29385d0;hpb=5d355340846c8fa87486dd85d817405c9619b544;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 8d16a02..ef8a8f2 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -44,7 +44,8 @@ CCECCommandHandler::CCECCommandHandler(CCECBusDevice *busDevice) : m_processor(m_busDevice->GetProcessor()), m_iTransmitTimeout(CEC_DEFAULT_TRANSMIT_TIMEOUT), m_iTransmitWait(CEC_DEFAULT_TRANSMIT_WAIT), - m_iTransmitRetries(CEC_DEFAULT_TRANSMIT_RETRIES) + m_iTransmitRetries(CEC_DEFAULT_TRANSMIT_RETRIES), + m_bHandlerInited(false) { } @@ -946,8 +947,12 @@ bool CCECCommandHandler::InitHandler(void) primary->SetPowerStatus(CEC_POWER_STATUS_ON); primary->SetMenuState(CEC_MENU_STATE_ACTIVATED); - m_processor->SetActiveSource(); - primary->TransmitMenuState(m_busDevice->GetLogicalAddress()); + if (m_processor->GetPrimaryDevice()->GetPhysicalAddress(false) != 0xffff) + { + m_processor->SetActiveSource(); + primary->TransmitMenuState(m_busDevice->GetLogicalAddress()); + m_bHandlerInited = true; + } } return true; }