summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-03 21:36:25 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-03 21:36:25 +0300
commit070511a39b941fd4648e46a2302e1670c3fef09e (patch)
treebc190cb6e485783f00210a364e424ce14b76011e /src/client.cpp
parent5bde28f9cd5b075f5d17d94a955d0700e0f8e664 (diff)
downloadmanaverse-070511a39b941fd4648e46a2302e1670c3fef09e.tar.gz
manaverse-070511a39b941fd4648e46a2302e1670c3fef09e.tar.bz2
manaverse-070511a39b941fd4648e46a2302e1670c3fef09e.tar.xz
manaverse-070511a39b941fd4648e46a2302e1670c3fef09e.zip
add config versioning.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index df8fa3c85..1199c1213 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -589,6 +589,7 @@ void Client::gameInit()
runCounters = config.getBoolValue("packetcounters");
applyVSync();
graphicsManager.setVideoMode();
+ checkConfigVersion();
getConfigDefaults2(config.getDefaultValues());
applyGrabMode();
applyGamma();
@@ -2929,3 +2930,17 @@ void Client::updateScreenKeyboard(int height A_UNUSED)
{
// logger->log("keyboard height: %d", height);
}
+
+void Client::checkConfigVersion()
+{
+ const int version = config.getIntValue("cfgver");
+ if (version < 1)
+ {
+ if (config.getIntValue("fontSize") == 11)
+ config.deleteKey("fontSize");
+ if (config.getIntValue("npcfontSize") == 13)
+ config.deleteKey("npcfontSize");
+ }
+
+ config.setValue("cfgver", 1);
+}