cec: get the cached power status of a device in CVLCommandHandler::PowerUpEventReceiv...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 21 Jun 2012 09:16:32 +0000 (11:16 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 21 Jun 2012 09:16:32 +0000 (11:16 +0200)
src/lib/implementations/VLCommandHandler.cpp

index aadf98823f69546952226ae06cf84f1e766f1108..642b3839a456d6cef69d75bca0092d02a92a71e7 100644 (file)
@@ -159,14 +159,8 @@ bool CVLCommandHandler::PowerUpEventReceived(void)
       return true;
   }
 
-  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);
+  m_bPowerUpEventReceived = (m_busDevice->GetCurrentPowerStatus() == CEC_POWER_STATUS_ON);
   return m_bPowerUpEventReceived;
 }