cec: init the default handler after starting up. sets the active source and menu...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index bdabcb74ea23dd99717f0893c968fcc3b0889e47..0ca1557e9a6f298c36486238c7b1f42b28c70cd5 100644 (file)
@@ -922,3 +922,13 @@ bool CCECCommandHandler::Transmit(cec_command &command, bool bExpectResponse /*
 
   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());
+  }
+}