fixed - CCECClient::IsLibCECActiveSource returns false now while the active source...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 11 Oct 2012 12:12:25 +0000 (14:12 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 11 Oct 2012 12:12:25 +0000 (14:12 +0200)
src/lib/CECClient.cpp
src/lib/implementations/CECCommandHandler.h

index d6f8100dec9daa25b26b7e55986eeaf8e85f6858..9a28916b48bf0a42ff7bd0bd17ac06f651f7f30a 100644 (file)
@@ -1344,7 +1344,7 @@ bool CCECClient::IsLibCECActiveSource(void)
     cec_logical_address activeSource = m_processor->GetActiveSource();
     CCECBusDevice *device = m_processor->GetDevice(activeSource);
     if (device)
-      bReturn = device->IsHandledByLibCEC();
+      bReturn = device->IsHandledByLibCEC() && !device->GetHandler()->ActiveSourcePending();
   }
   return bReturn;
 }
index 61f9f47d5e722f2d2edb68a3ffc23167469239fd..fca8a966fa6aca7a4809cce9c9fad9727bf863f8 100644 (file)
@@ -97,6 +97,7 @@ namespace CEC
 
     virtual bool SupportsDeviceType(const cec_device_type UNUSED(type)) const { return true; };
     virtual cec_device_type GetReplacementDeviceType(const cec_device_type type) const { return type; }
+    virtual bool ActiveSourcePending(void) const { return m_iActiveSourcePending != 0; }
 
   protected:
     virtual int HandleActiveSource(const cec_command &command);