From: Lars Op den Kamp Date: Wed, 14 Nov 2012 23:42:34 +0000 (+0100) Subject: send active source message when we received a routing change with a device that is... X-Git-Tag: upstream/2.2.0~1^2~12^2~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=dd20b92de853e8cf0b07ee07cd4a6badc44d0505;p=deb_libcec.git send active source message when we received a routing change with a device that is handled by libCEC as address. issue #89 --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index de75db5..3217f71 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -1130,9 +1130,12 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute) if (!map) return; - CCECBusDevice* previouslyActive = map->GetActiveSource(); - if (!previouslyActive) + CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true); + if (newRoute && newRoute->IsHandledByLibCEC()) + { + ActivateSource(); return; + } CECDEVICEVEC devices; m_processor->GetDevices()->GetChildrenOf(devices, this);