From 5d9e4ee8e7ebd6354d720476ab9ebebbc81bddb0 Mon Sep 17 00:00:00 2001 From: Matus Kral Date: Sun, 25 May 2014 07:03:32 +0200 Subject: [PATCH] this solves problem with device dissapearing from TV's menu when source is changed to another device. (needs fix on adapter side to correctly mark devices with "ishandledbycec"). --- src/lib/implementations/CECCommandHandler.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 29d1ffb..a89ebe6 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -592,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; } -- 2.34.1