diff options
Diffstat (limited to 'common/util.cpp')
-rw-r--r-- | common/util.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/util.cpp b/common/util.cpp index 7e1282773d..521a12e4c7 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -365,12 +365,15 @@ const String getGameGUIOptionsDescription(uint32 options) { return res; } -void updateGameGUIOptions(const uint32 options) { +void updateGameGUIOptions(const uint32 options, const String &langOption) { + const String newOptionString = getGameGUIOptionsDescription(options) + " " + langOption; + if ((options && !ConfMan.hasKey("guioptions")) || - (ConfMan.hasKey("guioptions") && options != parseGameGUIOptions(ConfMan.get("guioptions")))) { - ConfMan.set("guioptions", getGameGUIOptionsDescription(options)); + (ConfMan.hasKey("guioptions") && ConfMan.get("guioptions") != newOptionString)) { + ConfMan.set("guioptions", newOptionString); ConfMan.flushToDisk(); } } -} // End of namespace Common +} // End of namespace Common + |