+
+bool CSLCommandHandler::InitHandler(void)
+{
+ if (m_busDevice->GetLogicalAddress() != CECDEVICE_TV)
+ return true;
+
+ /* LG TVs only route keypresses when the deck status is set to 0x20 */
+ cec_logical_addresses addr = m_busDevice->GetProcessor()->GetLogicalAddresses();
+ for (uint8_t iPtr = 0; iPtr < 15; iPtr++)
+ {
+ if (addr[iPtr])
+ {
+ CCECBusDevice *device = m_busDevice->GetProcessor()->m_busDevices[iPtr];
+ if (device && (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE ||
+ device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
+ {
+ ((CCECPlaybackDevice *)device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
+ ((CCECPlaybackDevice *)device)->TransmitDeckStatus(CECDEVICE_TV);
+ }
+ }
+ }
+ return true;
+}