cec: fixed - get the current power status of the TV when activating the source on...
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 19 Jun 2012 15:19:53 +0000 (17:19 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 19 Jun 2012 15:19:53 +0000 (17:19 +0200)
src/lib/implementations/VLCommandHandler.cpp

index 455a062d56811f503b49df407cfead656691e0c5..664de21b730783511146478580de304b4dd382b6 100644 (file)
@@ -124,8 +124,7 @@ bool CVLCommandHandler::TransmitActiveSource(const cec_logical_address iInitiato
   else
   {
     // transmit standard active source message
-    return CCECCommandHandler::TransmitActiveSource(iInitiator, iPhysicalAddress) &&
-        TransmitMenuState(iInitiator, CECDEVICE_TV, CEC_MENU_STATE_ACTIVATED);
+    return CCECCommandHandler::TransmitActiveSource(iInitiator, iPhysicalAddress);
   }
 }
 
@@ -155,7 +154,11 @@ bool CVLCommandHandler::PowerUpEventReceived(void)
       return true;
   }
 
-  cec_power_status powerStatus = m_busDevice->GetCurrentPowerStatus();
+  cec_logical_address sourceLA = m_busDevice->GetLogicalAddress();
+  if (sourceLA == CECDEVICE_TV)
+    sourceLA = m_processor->GetPrimaryDevice()->GetLogicalAddress();
+
+  cec_power_status powerStatus = m_busDevice->GetPowerStatus(sourceLA);
 
   CLockObject lock(m_mutex);
   m_bPowerUpEventReceived = (powerStatus == CEC_POWER_STATUS_ON);