From: Lars Op den Kamp Date: Thu, 17 Oct 2013 11:14:21 +0000 (+0200) Subject: fixed: only send an active source message when receiving a routing change to an addre... X-Git-Tag: upstream/2.2.0~1^2~3^2~34 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=f679125719df925c2b8973806a19601c23c40a0d fixed: only send an active source message when receiving a routing change to an address handled by libCEC. issue #56 --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index f2bd59f..4358324 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -1147,14 +1147,10 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute) return; CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true); - if (newRoute) + if (newRoute && newRoute->IsHandledByLibCEC()) { // we were made the active source, send notification - if (newRoute->IsHandledByLibCEC()) - newRoute->ActivateSource(); - // another device was made active - else - newRoute->MarkAsActiveSource(); + newRoute->ActivateSource(); } }