X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.cpp;h=7c9579d8ea6b24254af43679ef656562f04d89c9;hb=aab5cd7a7e40003b8b94ada86b4734c78ad06ea8;hp=f495b8b8643d756a62d0d3215a9f219c2638631e;hpb=6d50a26ba7acaf5afe7558a125084d98aa8b3c18;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index f495b8b..7c9579d 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -115,19 +115,13 @@ int CSLCommandHandler::HandleActiveSource(const cec_command &command) if (command.parameters.size == 2) { uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]); - CCECBusDevice *primary = m_processor->GetPrimaryDevice(); - bool bSendPowerOffState(iAddress != primary->GetCurrentPhysicalAddress() && primary->IsActiveSource()); - CCECBusDevice *device = m_processor->GetDeviceByPhysicalAddress(iAddress); if (device) device->MarkAsActiveSource(); - if (bSendPowerOffState) + { - { - CLockObject lock(m_SLMutex); - m_bActiveSourceSent = false; - } - primary->TransmitPowerState(CECDEVICE_TV, false); + CLockObject lock(m_SLMutex); + m_bActiveSourceSent = false; } return COMMAND_HANDLED; @@ -273,7 +267,7 @@ int CSLCommandHandler::HandleGiveDeckStatus(const cec_command &command) if (!device || command.parameters.size == 0) return CEC_ABORT_REASON_INVALID_OPERAND; - device->SetDeckStatus(!device->IsActiveSource() ? CEC_DECK_INFO_OTHER_STATUS : CEC_DECK_INFO_OTHER_STATUS_LG); + device->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG); if (command.parameters[0] == CEC_STATUS_REQUEST_ON) { device->TransmitDeckStatus(command.initiator, true);