diff options
author | Max Horn | 2010-04-13 10:08:17 +0000 |
---|---|---|
committer | Max Horn | 2010-04-13 10:08:17 +0000 |
commit | 69b86db74cfcd1abee5e52ff71732153f39feed7 (patch) | |
tree | ddfee9fce59211d00adbe7da5d0b2e259ffd6578 | |
parent | 5a17a7be5f4cdd4bc0b805c1dc5c47e2190d5490 (diff) | |
download | scummvm-rg350-69b86db74cfcd1abee5e52ff71732153f39feed7.tar.gz scummvm-rg350-69b86db74cfcd1abee5e52ff71732153f39feed7.tar.bz2 scummvm-rg350-69b86db74cfcd1abee5e52ff71732153f39feed7.zip |
Print message when creating new INI; don't rewrite it directly after reading.
Together with the r48651, this addresses bug #2983718:
"Incomprehensible message for missing scummvm.ini"
svn-id: r48653
-rw-r--r-- | common/config-manager.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 9bef6b37a6..abc5bfb52d 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -61,13 +61,18 @@ void ConfigManager::loadDefaultConfigFile() { _filename.clear(); // clear the filename to indicate that we are using the default config file // ... load it, if available ... - if (stream) + if (stream) { loadFromStream(*stream); - // ... and close it again. - delete stream; + // ... and close it again. + delete stream; + + } else { + // No config file -> create new one! + printf("Default configuration file missing, creating a new one\n"); - flushToDisk(); + flushToDisk(); + } } void ConfigManager::loadConfigFile(const String &filename) { |