From: Lars Op den Kamp Date: Thu, 12 Dec 2013 02:38:03 +0000 (+0100) Subject: always call the SourceActivated() callback in CCECBusDevice::MarkAsActiveSource(... X-Git-Tag: upstream/2.2.0~1^2~3^2~15 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=ea3e78c63860879e58030b6b01a3bdfb8475871c always call the SourceActivated() callback in CCECBusDevice::MarkAsActiveSource(), even when we were already active, and let clients handle dupes. this prevented the screensaver from being canceled in XBMC --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 7c563ca..489ded2 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -1082,14 +1082,12 @@ void CCECBusDevice::MarkAsActiveSource(void) if ((*it)->GetLogicalAddress() != m_iLogicalAddress) (*it)->MarkAsInactiveSource(); - if (bWasActivated) - { - if (IsHandledByLibCEC()) - m_processor->SetActiveSource(true, false); - CCECClient *client = GetClient(); - if (client) - client->SourceActivated(m_iLogicalAddress); - } + if (bWasActivated && IsHandledByLibCEC()) + m_processor->SetActiveSource(true, false); + + CCECClient *client = GetClient(); + if (client) + client->SourceActivated(m_iLogicalAddress); } void CCECBusDevice::MarkAsInactiveSource(bool bClientUnregistered /* = false */)