From: Lars Op den Kamp Date: Wed, 14 Nov 2012 09:55:40 +0000 (+0100) Subject: send an active source message when the route was set to the physical address that... X-Git-Tag: upstream/2.2.0~1^2~12^2~16 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=a14c6612501a38c47d776be279d1153d4d7ea7c1 send an active source message when the route was set to the physical address that is handled by libCEC --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index e9cc13b..de75db5 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -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(); } }