X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=0e00e4c2ef0107e654538aa4d2555321b1a6ed20;hb=d5890d16af8ca61857553a4285ee34c1d104353c;hp=3423c283b1960195a2ffb5f9bb3988ef2fe2b353;hpb=88d5d47fe5b37b8fab796e0ec563176bf05b3801;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 3423c28..0e00e4c 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -209,10 +209,12 @@ int CCECCommandHandler::HandleActiveSource(const cec_command &command) if (command.parameters.size == 2) { uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]); - m_processor->GetDevices()->SetActiveSource(iAddress); - CCECBusDevice *device = m_processor->GetDeviceByPhysicalAddress(iAddress); + CCECBusDevice *device = m_processor->GetDevice(command.initiator); if (device) + { + device->SetPhysicalAddress(iAddress); device->MarkAsActiveSource(); + } m_processor->GetDevices()->SignalAll(command.opcode); return COMMAND_HANDLED;