From 2270ce69c7ecb1914caf617f9a9cfa2222244741 Mon Sep 17 00:00:00 2001 From: Mark Kendall Date: Mon, 2 Apr 2012 17:12:51 +0100 Subject: [PATCH] CEC Configuration: Only update the physical address when it has actually changed. bugzid: 672 --- src/lib/CECProcessor.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 20ae10a..59a537f 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -1556,9 +1556,12 @@ bool CCECProcessor::SetConfiguration(const libcec_configuration *configuration) { if (configuration->iPhysicalAddress != 0) bPhysicalAddressChanged = IsRunning() && m_configuration.iPhysicalAddress != configuration->iPhysicalAddress; - if (IsRunning()) - CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using physical address '%4x'", __FUNCTION__, configuration->iPhysicalAddress); - m_configuration.iPhysicalAddress = configuration->iPhysicalAddress; + if (bPhysicalAddressChanged) + { + if (IsRunning()) + CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using physical address '%4x'", __FUNCTION__, configuration->iPhysicalAddress); + m_configuration.iPhysicalAddress = configuration->iPhysicalAddress; + } } bool bHdmiPortChanged(false); -- 2.34.1