X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.cpp;h=3e79fd1e433511622c25ddeb6943e889492b293a;hb=c4287bcda5182b4fe1f76c1b6492a6ac8902599d;hp=e8cdf43f8e4d10128e0fc76ef6dc992b8a9755d7;hpb=bbc71623d650a4f17057da7d218a824c0c95b3d3;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index e8cdf43..3e79fd1 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -229,7 +229,17 @@ void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command) { SetSLInitialised(); device->SetActiveSource(); - ActivateSource(); + device->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); + device->TransmitPowerState(command.initiator); + + CEvent::Sleep(2000); + device->SetPowerStatus(CEC_POWER_STATUS_ON); + device->TransmitPowerState(command.initiator); + device->TransmitPhysicalAddress(); + { + CLockObject lock(m_SLMutex); + m_bActiveSourceSent = false; + } } } void CSLCommandHandler::HandleVendorCommandPowerOnStatus(const cec_command &command) @@ -269,11 +279,12 @@ bool CSLCommandHandler::HandleGiveDeckStatus(const cec_command &command) { if (command.parameters.size > 0) { - ((CCECPlaybackDevice *) device)->SetDeckStatus(!device->IsActiveSource() ? CEC_DECK_INFO_OTHER_STATUS : CEC_DECK_INFO_OTHER_STATUS_LG); + ((CCECPlaybackDevice *) device)->SetDeckStatus(!device->IsActiveSource() || !ActiveSourceSent() ? CEC_DECK_INFO_OTHER_STATUS : CEC_DECK_INFO_OTHER_STATUS_LG); if (command.parameters[0] == CEC_STATUS_REQUEST_ON) { bool bReturn = ((CCECPlaybackDevice *) device)->TransmitDeckStatus(command.initiator); - ActivateSource(); + if (!ActiveSourceSent()) + ActivateSource(); return bReturn; } else if (command.parameters[0] == CEC_STATUS_REQUEST_ONCE)