X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECClient.cpp;h=6df9dbab4288f6898fa1316b3fbf38697a22da2d;hb=4a01fcd6b9d7c922ea5400d9f01406e7ad9332b9;hp=93b9916db352fcf6404a52fec45fb19b9dc633af;hpb=4691dc3b885e390988f6104336afc682f3b157a2;p=deb_libcec.git diff --git a/src/lib/CECClient.cpp b/src/lib/CECClient.cpp index 93b9916..6df9dba 100644 --- a/src/lib/CECClient.cpp +++ b/src/lib/CECClient.cpp @@ -1170,7 +1170,17 @@ bool CCECClient::SetDevicePhysicalAddress(const uint16_t iPhysicalAddress) bool CCECClient::SwitchMonitoring(bool bEnable) { - return m_processor ? m_processor->SwitchMonitoring(bEnable) : false; + LIB_CEC->AddLog(CEC_LOG_NOTICE, "== %s monitoring mode ==", bEnable ? "enabling" : "disabling"); + + if (m_processor) + { + if (bEnable) + return m_processor->UnregisterClient(this); + else + return m_processor->RegisterClient(this); + } + + return false; } bool CCECClient::PollDevice(const cec_logical_address iAddress)