X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=a89ebe6c27ee2bc5fb632a6b26ee29749af3331c;hb=b45bdacdeee5c96e0294717fbe2c47a49a110fd1;hp=ee602f1e6dfa90ecc7242f003fdbba374aeda5a4;hpb=14004a262acba6d284ce6489ef18468bdc1a6e5c;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index ee602f1..a89ebe6 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -257,6 +257,14 @@ int CCECCommandHandler::HandleDeviceVendorCommandWithId(const cec_command & UNUS int CCECCommandHandler::HandleDeviceVendorId(const cec_command &command) { SetVendorId(command); + + if (command.initiator == CECDEVICE_TV) + { + CCECBusDevice* primary = m_processor->GetPrimaryDevice(); + if (primary) + primary->TransmitVendorID(CECDEVICE_BROADCAST, false, false); + } + return COMMAND_HANDLED; } @@ -584,12 +592,15 @@ int CCECCommandHandler::HandleSetStreamPath(const cec_command &command) CCECBusDevice *device = GetDeviceByPhysicalAddress(iStreamAddress); if (device) { - if (device->IsHandledByLibCEC() && !device->IsActiveSource()) - device->ActivateSource(); - else + if (device->IsHandledByLibCEC()) { - device->MarkAsActiveSource(); - device->TransmitActiveSource(true); + if (!device->IsActiveSource()) + device->ActivateSource(); + else + { + device->MarkAsActiveSource(); + device->TransmitActiveSource(true); + } } return COMMAND_HANDLED; }