From: Lars Op den Kamp Date: Mon, 12 Nov 2012 23:30:09 +0000 (+0100) Subject: only mark a device as active source from cache if it's powered on X-Git-Tag: upstream/2.2.0~1^2~12^2~28 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4ba7bfae1e415640550a7515b5b8a910c893a208;p=deb_libcec.git only mark a device as active source from cache if it's powered on --- diff --git a/src/lib/devices/CECDeviceMap.cpp b/src/lib/devices/CECDeviceMap.cpp index 1280de6..b614e1a 100644 --- a/src/lib/devices/CECDeviceMap.cpp +++ b/src/lib/devices/CECDeviceMap.cpp @@ -208,6 +208,7 @@ CCECBusDevice *CCECDeviceMap::GetActiveSource(void) const for (CECDEVICEMAP::const_iterator it = m_busDevices.begin(); it != m_busDevices.end(); it++) { if (m_iActiveSource != CEC_INVALID_PHYSICAL_ADDRESS && !it->second->IsActiveSource() && + it->second->GetCurrentPowerStatus() == CEC_POWER_STATUS_ON && m_iActiveSource == it->second->GetCurrentPhysicalAddress()) it->second->MarkAsActiveSource(); if (it->second->IsActiveSource())