diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-07-06 19:26:06 +0300 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-07-06 19:26:41 +0300 |
commit | c483a044b587691f70fd7e8cb5348c59a8509d76 (patch) | |
tree | 99d462a04fd5bc92a2461a976f10d89980a81ea6 /src/core/ControllerConfig.cpp | |
parent | 70fa4ab79c331bd20b872ca4bc578248d5f42971 (diff) |
Noskillx's PR + fix .set loading
Diffstat (limited to 'src/core/ControllerConfig.cpp')
-rw-r--r-- | src/core/ControllerConfig.cpp | 7 |
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(); |