summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp15
-rw-r--r--src/client.h2
-rw-r--r--src/defaults.cpp1
3 files changed, 18 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);
+}
diff --git a/src/client.h b/src/client.h
index e5bf5183e..733bc21e8 100644
--- a/src/client.h
+++ b/src/client.h
@@ -366,6 +366,8 @@ private:
void logVars();
+ void checkConfigVersion();
+
static Client *mInstance;
static void bindTextDomain(const char *const name, const char *const path);
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 045b007f0..481960606 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -316,6 +316,7 @@ DefaultsData* getConfigDefaults()
AddDEF("moveNames", false);
AddDEF("uselonglivesprites", false);
AddDEF("screenDensity", 0);
+ AddDEF("cfgver", 0);
return configData;
}