From: Lars Op den Kamp Date: Tue, 20 Dec 2011 22:27:18 +0000 (+0100) Subject: cec: set the power state to 'powered on' by default X-Git-Tag: upstream/2.2.0~1^2~43^2~33 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=6b1eea982ef9d4967ea7994f3c5e8dc246a5188c;p=deb_libcec.git cec: set the power state to 'powered on' by default --- diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 0ca1557..5a3de0b 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -927,8 +927,11 @@ bool CCECCommandHandler::InitHandler(void) { if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV) { + CCECBusDevice *primary = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary]; + primary->SetPowerStatus(CEC_POWER_STATUS_ON); + primary->SetMenuState(CEC_MENU_STATE_ACTIVATED); + m_processor->SetActiveSource(); - m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary]->SetMenuState(CEC_MENU_STATE_ACTIVATED); - m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary]->TransmitMenuState(m_busDevice->GetLogicalAddress()); + primary->TransmitMenuState(m_busDevice->GetLogicalAddress()); } }