cec: send deck status 0x20 when an LG tv is found, so keypresses will be routed to...
[deb_libcec.git] / src / lib / CECProcessor.cpp
index d1d7c6d472c6d56d1fa626c17ddfbc1439f145a8..6791d514401b41d3f356a01037e2e87161535710 100644 (file)
@@ -315,8 +315,17 @@ bool CCECProcessor::SetActiveSource(cec_device_type type /* = CEC_DEVICE_TYPE_RE
     }
   }
 
-  return SetStreamPath(m_busDevices[addr]->GetPhysicalAddress(false)) &&
-      m_busDevices[addr]->TransmitActiveSource();
+  bReturn = m_busDevices[CECDEVICE_TV]->PowerOn() &&
+      m_busDevices[addr]->TransmitActiveSource() &&
+      SetStreamPath(m_busDevices[addr]->GetPhysicalAddress(false));
+
+  if (bReturn && (m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE ||
+      m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
+  {
+    bReturn = ((CCECPlaybackDevice *)m_busDevices[addr])->TransmitDeckStatus(CECDEVICE_TV);
+  }
+
+  return bReturn;
 }
 
 bool CCECProcessor::SetActiveSource(cec_logical_address iAddress)