diff --git a/src/tools/prefs.win.cpp b/src/tools/prefs.win.cpp index cb676522..7f350532 100644 --- a/src/tools/prefs.win.cpp +++ b/src/tools/prefs.win.cpp @@ -66,6 +66,17 @@ std::vector get_iarray_pref(std::string keypath) { return {}; } +void set_pref(std::string keypath, std::string value) { + prefsDirty = true; + prefs[keypath] = value; +} + +std::string get_string_pref(std::string keypath, std::string fallback) { + if(prefs.find(keypath) == prefs.end()) return fallback; + if(prefs[keypath].type() == typeid(std::string)) return boost::any_cast(prefs[keypath]); + return fallback; +} + void clear_pref(std::string keypath) { prefsDirty = true; auto iter = prefs.find(keypath);