cec: always persist a changed configuration when possible
authorLars Op den Kamp <lars@opdenkamp.eu>
Mon, 14 May 2012 12:45:17 +0000 (14:45 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Mon, 14 May 2012 12:45:17 +0000 (14:45 +0200)
src/lib/CECClient.cpp

index 4ac7243798e00fa35be75a8be6dae25ddff6da55..013a7656209dc7ca9b76004291ba6a3f0f85c015 100644 (file)
@@ -234,8 +234,7 @@ bool CCECClient::SetPhysicalAddress(const uint16_t iPhysicalAddress)
   }
 
   // persist the new configuration
-  if (m_processor->CECInitialised())
-    m_processor->PersistConfiguration(m_configuration);
+  m_processor->PersistConfiguration(m_configuration);
 
   // set the physical address for each device
   SetDevicePhysicalAddress(iPhysicalAddress);
@@ -818,8 +817,7 @@ bool CCECClient::SetConfiguration(const libcec_configuration &configuration)
     SetPhysicalAddress(configuration);
   }
 
-  if (bIsRunning)
-    m_processor->PersistConfiguration(m_configuration);
+  m_processor->PersistConfiguration(m_configuration);
 
   if (!primary)
     primary = GetPrimaryDevice();