cec: always send a power on command in CCECBusDevice::PowerOn()
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 25 Nov 2011 11:37:12 +0000 (12:37 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 25 Nov 2011 11:37:30 +0000 (12:37 +0100)
src/lib/devices/CECBusDevice.cpp

index 3d8feaf4379ec54e08dd160fe7c5e0362bbc9d81..42aa02c6644b480c2c3e9b9f889423b1f42930fc 100644 (file)
@@ -109,23 +109,19 @@ void CCECBusDevice::PollVendorId(void)
 
 bool CCECBusDevice::PowerOn(void)
 {
-  cec_power_status current = GetPowerStatus();
-  if (current != CEC_POWER_STATUS_ON &&
-      current != CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON)
-  {
-    CStdString strLog;
-    strLog.Format("<< powering on '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
-    AddLog(CEC_LOG_DEBUG, strLog.c_str());
-
-    SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
-
-    cec_command command;
-    cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_IMAGE_VIEW_ON);
-
-    return m_processor->Transmit(command);
+   CStdString strLog;
+   strLog.Format("<< powering on '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
+   AddLog(CEC_LOG_DEBUG, strLog.c_str());
+
+   cec_command command;
+   cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_IMAGE_VIEW_ON);
+   if (m_processor->Transmit(command))
+   {
+     GetPowerStatus();
+     return true;
   }
 
-  return true;
+  return false;
 }
 
 bool CCECBusDevice::Standby(void)