diff --git a/src/Settings.cpp b/src/Settings.cpp index f9e6549b1..36abc5de4 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -3,9 +3,21 @@ #include "pugiXML/pugixml.hpp" #include "platform.h" #include +#include Settings* Settings::sInstance = NULL; +// these values are NOT saved to es_settings.xml +// since they're set through command-line arguments, and not the in-program settings menu +std::vector settings_dont_save = boost::assign::list_of + ("Debug") + ("DebugGrid") + ("DebugText") + ("ParseGamelistOnly") + ("ShowExit") + ("Windowed") + ("IgnoreGamelist"); + Settings::Settings() { setDefaults(); @@ -33,7 +45,6 @@ void Settings::setDefaults() mBoolMap["ShowHelpPrompts"] = true; mBoolMap["ScrapeRatings"] = true; mBoolMap["IgnoreGamelist"] = false; - mBoolMap["ParseGamelistOnly"] = false; mBoolMap["QuickSystemSelect"] = true; mBoolMap["Debug"] = false; @@ -44,8 +55,6 @@ void Settings::setDefaults() mIntMap["ScraperResizeWidth"] = 400; mIntMap["ScraperResizeHeight"] = 0; - mIntMap["GameListSortIndex"] = 0; - mStringMap["TransitionStyle"] = "fade"; mStringMap["ThemeSet"] = ""; mStringMap["ScreenSaverBehavior"] = "dim"; @@ -57,6 +66,10 @@ void saveMap(pugi::xml_document& doc, std::map& map, const char* type) { for(auto iter = map.begin(); iter != map.end(); iter++) { + // key is on the "don't save" list, so don't save it + if(std::find(settings_dont_save.begin(), settings_dont_save.end(), iter->first) != settings_dont_save.end()) + continue; + pugi::xml_node node = doc.append_child(type); node.append_attribute("name").set_value(iter->first.c_str()); node.append_attribute("value").set_value(iter->second);