diff options
author | Johannes Schickel | 2010-07-05 20:10:56 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-07-05 20:10:56 +0000 |
commit | 1443a2721c77e4336dd894e66a377950b4f23273 (patch) | |
tree | 940367be81d20518a645a9f67840466fc5d89fa2 /common | |
parent | 73e51735a4b43a05e3cbd293712b4951c56aaea8 (diff) | |
download | scummvm-rg350-1443a2721c77e4336dd894e66a377950b4f23273.tar.gz scummvm-rg350-1443a2721c77e4336dd894e66a377950b4f23273.tar.bz2 scummvm-rg350-1443a2721c77e4336dd894e66a377950b4f23273.zip |
Fix update of GUI options, which only differ in the language setting.
svn-id: r50706
Diffstat (limited to 'common')
-rw-r--r-- | common/util.cpp | 11 | ||||
-rw-r--r-- | common/util.h | 2 |
2 files changed, 8 insertions, 5 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 + diff --git a/common/util.h b/common/util.h index 823788ca04..7a9cf4fb2d 100644 --- a/common/util.h +++ b/common/util.h @@ -240,7 +240,7 @@ const String getGameGUIOptionsDescriptionLanguage(Language lang); * domain, when they differ to the ones passed as * parameter. */ -void updateGameGUIOptions(const uint32 options); +void updateGameGUIOptions(const uint32 options, const String &langOption); } // End of namespace Common |