always call the SourceActivated() callback in CCECBusDevice::MarkAsActiveSource(...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 12 Dec 2013 02:38:03 +0000 (03:38 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 12 Dec 2013 02:38:13 +0000 (03:38 +0100)
src/lib/devices/CECBusDevice.cpp

index 7c563ca0ce4ab6e742aa62e1ea0e734058c0d054..489ded2cec4f441d379922e76f5be7459795c452 100644 (file)
@@ -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 */)