X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=b1761a3d763ae922ee03fb6f2daa0b002a90ed6f;hb=d9de2aae6b2f47b8e1faacc69adba7406b9d85f0;hp=a44b81eb6a314167395916af458c7ab3d26c91f4;hpb=3e3f087431e4731d9a1962954bc9d084720456e1;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index a44b81e..b1761a3 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -245,12 +245,17 @@ void *CCECProcessor::Process(void) // check whether the TV is present and responding if (tvPresentCheck.TimeLeft() == 0) { - if (!m_busDevices->At(CECDEVICE_TV)->IsPresent()) + CCECClient *primary = GetPrimaryClient(); + // only check whether the tv responds to polls when a client is connected and not in monitoring mode + if (primary && primary->GetConfiguration()->bMonitorOnly != 1) { - libcec_parameter param; - param.paramType = CEC_PARAMETER_TYPE_STRING; - param.paramData = (void*)"TV does not respond to CEC polls"; - GetPrimaryClient()->Alert(CEC_ALERT_TV_POLL_FAILED, param); + if (!m_busDevices->At(CECDEVICE_TV)->IsPresent()) + { + libcec_parameter param; + param.paramType = CEC_PARAMETER_TYPE_STRING; + param.paramData = (void*)"TV does not respond to CEC polls"; + primary->Alert(CEC_ALERT_TV_POLL_FAILED, param); + } } tvPresentCheck.Init(TV_PRESENT_CHECK_INTERVAL); } @@ -854,7 +859,7 @@ bool CCECProcessor::RegisterClient(CCECClient *client) client->GetPrimaryDevice()->TransmitOSDName(CECDEVICE_TV, false); // request the power status of the TV - tv->RequestPowerStatus(sourceAddress, true); + tv->RequestPowerStatus(sourceAddress, true, true); return bReturn; }