fixed - CCECClient::IsLibCECActiveSource returns false now while the active source...
[deb_libcec.git] / src / lib / CECClient.cpp
index 6be95b735b2bf560226b1857b215f0fa5d2ddeb6..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;
 }
@@ -1377,7 +1377,7 @@ void CCECClient::CallbackAddKey(const cec_keypress &key)
     int64_t now = GetTimeMs();
     if (m_lastKeypress.keycode != key.keycode ||
         key.duration > 0 ||
-        now - m_iLastKeypressTime >= CEC_DOUBLE_TAP_TIMEOUT_MS)
+        now - m_iLastKeypressTime >= m_configuration.iDoubleTapTimeoutMs)
     {
       // no double tap
       if (key.duration == 0)