cec: read the persisted settings from the ROM, and update it in libcec_configuration...
[deb_libcec.git] / src / lib / CECProcessor.cpp
index dee5f5949af2321acdfbb62a0682599014305d67..1f4678245fe49e699c40fb68771ee7dcdaab8d73 100644 (file)
@@ -150,6 +150,7 @@ void CCECProcessor::Close(void)
 
   if (bClose && m_communication)
   {
+    m_communication->PersistConfiguration(&m_configuration);
     m_communication->Close();
     delete m_communication;
     m_communication = NULL;
@@ -193,6 +194,9 @@ bool CCECProcessor::OpenConnection(const char *strPort, uint16_t iBaudRate, uint
   if (bReturn)
     CLibCEC::AddLog(CEC_LOG_NOTICE, "connected to the CEC adapter. firmware version = %d, client version = %s", m_communication->GetFirmwareVersion(), ToString((cec_client_version)m_configuration.clientVersion));
 
+  if (m_configuration.bGetSettingsFromROM == 1)
+    m_communication->GetConfiguration(&m_configuration);
+
   return bReturn;
 }