this solves problem with device dissapearing from TV's menu
authorMatus Kral <matuskral@me.com>
Sun, 25 May 2014 05:03:32 +0000 (07:03 +0200)
committerMatus Kral <matuskral@me.com>
Thu, 29 May 2014 01:15:34 +0000 (03:15 +0200)
when source is changed to another device.

(needs fix on adapter side to correctly mark devices with
"ishandledbycec").

src/lib/implementations/CECCommandHandler.cpp

index 29d1ffbcc7444b9725555de8f7f76d7d1b28fa58..a89ebe6c27ee2bc5fb632a6b26ee29749af3331c 100644 (file)
@@ -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;
     }