From: Lars Op den Kamp Date: Fri, 9 Nov 2012 15:32:55 +0000 (+0100) Subject: always poll the TV if it's marked as not present. issue #83. issue #84 X-Git-Tag: upstream/2.2.0~1^2~12^2~36 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=79efa271178e459bbcb9da348b4bef012370bc16;p=deb_libcec.git always poll the TV if it's marked as not present. issue #83. issue #84 --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index 5fe6d4d..1176089 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -740,8 +740,13 @@ cec_bus_device_status CCECBusDevice::GetStatus(bool bForcePoll /* = false */, bo CLockObject lock(m_mutex); status = m_deviceStatus; bNeedsPoll = !bSuppressPoll && - (bForcePoll || m_deviceStatus == CEC_DEVICE_STATUS_UNKNOWN) && - m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC; + m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC && + // poll forced + (bForcePoll || + // don't know the status + m_deviceStatus == CEC_DEVICE_STATUS_UNKNOWN || + // always poll the TV if it's marked as not present + (m_deviceStatus == CEC_DEVICE_STATUS_NOT_PRESENT && m_iLogicalAddress == CECDEVICE_TV)); } if (bNeedsPoll)