cec: display an alert message when the firmware of the adapter can be upgraded. bugzi...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.cpp
index 82110bcec58bd667a32b89b9b6c65e5297b1d831..449c589e27154805350ab8dee9cbb06204bd2f40 100644 (file)
@@ -440,6 +440,7 @@ bool CCECCommandHandler::HandleRequestActiveSource(const cec_command &command)
   if (m_processor->IsRunning())
   {
     CLibCEC::AddLog(CEC_LOG_DEBUG, ">> %i requests active source", (uint8_t) command.initiator);
+    m_processor->m_busDevices[command.initiator]->SetPowerStatus(CEC_POWER_STATUS_ON);
 
     vector<CCECBusDevice *> devices;
     for (size_t iDevicePtr = 0; iDevicePtr < GetMyDevices(devices); iDevicePtr++)
@@ -681,7 +682,7 @@ size_t CCECCommandHandler::GetMyDevices(vector<CCECBusDevice *> &devices) const
   size_t iReturn(0);
 
   cec_logical_addresses addresses = m_processor->GetLogicalAddresses();
-  for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
+  for (uint8_t iPtr = CECDEVICE_TV; iPtr < CECDEVICE_BROADCAST; iPtr++)
   {
     if (addresses[iPtr])
     {