X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=80bc280a3bb9b8af47e7be43582baa8ef9f22111;hb=3fd2a2b89c3f6f9d8e28c19e45622386a981ef8d;hp=11d550c32adf7bdd6874eab1bef9d3e544e9789a;hpb=72689600b9622fd55a53d9a95b8af42823d00356;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 11d550c..80bc280 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -564,7 +564,18 @@ bool CCECCommandHandler::HandleUserControlPressed(const cec_command &command) { CCECBusDevice *device = GetDevice(command.destination); if (device) + { device->SetPowerStatus(CEC_POWER_STATUS_ON); + if (device->MyLogicalAddressContains(device->GetLogicalAddress())) + { + device->SetActiveSource(); + device->TransmitActiveSource(); + + if (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || + device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) + ((CCECPlaybackDevice *)device)->TransmitDeckStatus(command.initiator); + } + } } m_processor->SetCurrentButton((cec_user_control_code) command.parameters[0]);