if (!SLInitialised() && command.initiator == CECDEVICE_TV)
{
- cec_command response;
- cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_FEATURE_ABORT);
- return Transmit(response);
+ CCECBusDevice *destination = m_processor->GetDevice(command.destination);
+ if (destination && (destination->GetLogicalAddress() == CECDEVICE_BROADCAST || destination->IsHandledByLibCEC()))
+ {
+ cec_logical_address initiator = destination->GetLogicalAddress();
+ if (initiator == CECDEVICE_BROADCAST)
+ initiator = m_processor->GetPrimaryDevice()->GetLogicalAddress();
+
+ cec_command response;
+ cec_command::Format(response, initiator, command.initiator, CEC_OPCODE_FEATURE_ABORT);
+ return Transmit(response);
+ }
}
return true;
}
bool CSLCommandHandler::HandleGiveDeckStatus(const cec_command &command)
{
- if (m_processor->IsRunning() && m_processor->IsHandledByLibCEC(command.destination))
+ if (m_processor->CECInitialised() && m_processor->IsHandledByLibCEC(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
bool CSLCommandHandler::HandleGiveDevicePowerStatus(const cec_command &command)
{
bool bReturn(false);
- if (m_processor->IsRunning() && m_processor->IsHandledByLibCEC(command.destination) && command.initiator == CECDEVICE_TV)
+ if (m_processor->CECInitialised() && m_processor->IsHandledByLibCEC(command.destination) && command.initiator == CECDEVICE_TV)
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && device->GetCurrentPowerStatus() != CEC_POWER_STATUS_ON)
bool CSLCommandHandler::HandleRequestActiveSource(const cec_command &command)
{
- if (m_processor->IsRunning())
+ if (m_processor->CECInitialised())
{
if (ActiveSourceSent())
LIB_CEC->AddLog(CEC_LOG_DEBUG, ">> %i requests active source, ignored", (uint8_t) command.initiator);