summaryrefslogtreecommitdiff
path: root/src/core/ControllerConfig.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-06 19:26:06 +0300
committereray orçunus <erayorcunus@gmail.com>2020-07-06 19:26:41 +0300
commitc483a044b587691f70fd7e8cb5348c59a8509d76 (patch)
tree99d462a04fd5bc92a2461a976f10d89980a81ea6 /src/core/ControllerConfig.cpp
parent70fa4ab79c331bd20b872ca4bc578248d5f42971 (diff)
Noskillx's PR + fix .set loading
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();