summaryrefslogtreecommitdiffstats
path: root/src/core/ControllerConfig.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-06 18:26:06 +0200
committereray orçunus <erayorcunus@gmail.com>2020-07-06 18:26:41 +0200
commitc483a044b587691f70fd7e8cb5348c59a8509d76 (patch)
tree99d462a04fd5bc92a2461a976f10d89980a81ea6 /src/core/ControllerConfig.cpp
parentFrontend: Stats, Briefs, gta_vc.set, slider ranges, fixes (diff)
downloadre3-c483a044b587691f70fd7e8cb5348c59a8509d76.tar
re3-c483a044b587691f70fd7e8cb5348c59a8509d76.tar.gz
re3-c483a044b587691f70fd7e8cb5348c59a8509d76.tar.bz2
re3-c483a044b587691f70fd7e8cb5348c59a8509d76.tar.lz
re3-c483a044b587691f70fd7e8cb5348c59a8509d76.tar.xz
re3-c483a044b587691f70fd7e8cb5348c59a8509d76.tar.zst
re3-c483a044b587691f70fd7e8cb5348c59a8509d76.zip
Diffstat (limited to 'src/core/ControllerConfig.cpp')
-rw-r--r--src/core/ControllerConfig.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index 2febefdd..d194cebb 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -131,6 +131,7 @@ void CControllerConfigManager::SaveSettings(int32 file)
void CControllerConfigManager::LoadSettings(int32 file)
{
bool bValid = true;
+ int nVersion = 0;
if (file)
{
@@ -139,11 +140,13 @@ void CControllerConfigManager::LoadSettings(int32 file)
if (!strncmp(buff, TopLineEmptyFile, sizeof(TopLineEmptyFile)-1))
bValid = false;
- else
+ else {
CFileMgr::Seek(file, 0, 0);
+ CFileMgr::Read(file, (char*)&nVersion, sizeof(nVersion));
+ }
}
- if (bValid)
+ if (bValid && nVersion >= 3)
{
ControlsManager.MakeControllerActionsBlank();