cec: check the correct value in the PA override
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 27 Apr 2012 22:57:36 +0000 (00:57 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 27 Apr 2012 23:06:03 +0000 (01:06 +0200)
src/lib/CECProcessor.cpp

index 41780face9b69fb4731851c7485af1138603c2c1..b4f612b26bdfd94f8b895a642dda8624918243c8 100644 (file)
@@ -1613,7 +1613,7 @@ bool CCECProcessor::SetConfiguration(const libcec_configuration *configuration)
   }
 
   bool bHdmiPortChanged(false);
-  if (!IsValidPhysicalAddress(m_configuration.iPhysicalAddress))
+  if (!bPhysicalAutodetected && !IsValidPhysicalAddress(configuration->iPhysicalAddress))
   {
     // base device
     bHdmiPortChanged = IsRunning() && m_configuration.baseDevice != configuration->baseDevice;
@@ -1625,7 +1625,7 @@ bool CCECProcessor::SetConfiguration(const libcec_configuration *configuration)
     CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using HDMI port '%d'", __FUNCTION__, configuration->iHDMIPort);
     m_configuration.iHDMIPort = configuration->iHDMIPort;
   }
-  else if (IsValidPhysicalAddress(m_configuration.iPhysicalAddress))
+  else
   {
     CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - resetting HDMI port and base device to defaults", __FUNCTION__);
     m_configuration.baseDevice = CECDEVICE_UNKNOWN;