send an active source message when the route was set to the physical address that...
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 14 Nov 2012 09:55:40 +0000 (10:55 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 14 Nov 2012 09:55:40 +0000 (10:55 +0100)
src/lib/devices/CECBusDevice.cpp

index e9cc13b93f79974bbc34866687dfb1ac8352c8bc..de75db5760b7e3bff8f3c365cc08ecdc07c8b7cf 100644 (file)
@@ -1139,7 +1139,9 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
 
   for (CECDEVICEVEC::iterator it = devices.begin(); it != devices.end(); it++)
   {
-    if (!CCECTypeUtils::PhysicalAddressIsIncluded(iRoute, (*it)->GetCurrentPhysicalAddress()))
+    if ((*it)->GetCurrentPhysicalAddress() == iRoute && (*it)->IsHandledByLibCEC())
+      (*it)->ActivateSource();
+    else if (!CCECTypeUtils::PhysicalAddressIsIncluded(iRoute, (*it)->GetCurrentPhysicalAddress()))
       (*it)->MarkAsInactiveSource();
   }
 }