- CCECBusDevice *device = m_processor->GetDeviceByType(CEC_DEVICE_TYPE_PLAYBACK_DEVICE);
- if (device)
- ((CCECPlaybackDevice *)device)->SetDeckStatus(deckStatus);
+ if (m_processor->IsRunning() && m_busDevice->MyLogicalAddressContains(command.destination))
+ {
+ CCECBusDevice *device = GetDevice(command.destination);
+ if (device && (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
+ {
+ if (command.parameters.size > 0)
+ {
+ ((CCECPlaybackDevice *) device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
+ if (command.parameters[0] == CEC_STATUS_REQUEST_ON)
+ {
+ return ((CCECPlaybackDevice *) device)->TransmitDeckStatus(command.initiator) &&
+ device->TransmitImageViewOn() &&
+ device->TransmitPhysicalAddress();
+ }
+ else if (command.parameters[0] == CEC_STATUS_REQUEST_ONCE)
+ {
+ return ((CCECPlaybackDevice *) device)->TransmitDeckStatus(command.initiator);
+ }
+ }
+ }
+ return CCECCommandHandler::HandleGiveDeckStatus(command);
+ }