From 7eb9e9282bb5dad3132cc8fdfd2f43d2c17c7950 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 9 Feb 2021 20:31:44 +0100 Subject: [PATCH] settings: load scan defaults before save scan.conf Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c6847ab684faaead48d87f9100a87925dc95beec Author: vanhofen Date: 2021-02-09 (Tue, 09 Feb 2021) Origin message was: ------------------ - settings: load scan defaults before save scan.conf ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/settings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 547fe2662..e35b8d37f 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -22,6 +22,7 @@ */ #include +#include #include #include @@ -190,6 +191,10 @@ bool CScanSettings::loadSettings(const char * const fileName) bool CScanSettings::saveSettings(const char * const fileName) { + // get sure we got initialized variables + if (access(fileName, R_OK) != 0) + loadSettings(fileName); + configfile.setInt32("bouquetMode", bouquetMode); configfile.setInt32("scanType", scanType);