if (SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true))
{
- SetMenuState(CEC_MENU_STATE_ACTIVATED);
+ /* init the default handler */
+ if (m_busDevices[CECDEVICE_TV]->GetHandler()->GetVendorId() == CEC_VENDOR_UNKNOWN)
+ m_busDevices[CECDEVICE_TV]->GetHandler()->InitHandler();
m_controller->AddLog(CEC_LOG_DEBUG, "processor thread started");
m_busScan = new CCECBusScan(this);
return false;
}
+
+bool CCECCommandHandler::InitHandler(void)
+{
+ if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
+ {
+ 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());
+ }
+}
virtual void HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination);
virtual bool HandleReceiveFailed(void);
- virtual bool InitHandler(void) { return true; }
+ virtual bool InitHandler(void);
virtual uint8_t GetTransmitRetries(void) const { return m_iTransmitRetries; }
virtual bool TransmitPowerOn(const cec_logical_address iInitiator, const cec_logical_address iDestination);