From 48921a62322bd4eae17d1085256693aa66041dbd Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jul 2021 20:22:53 +0300 Subject: SL-443 Keybindings: Backward compatibility --- indra/newview/llviewerinput.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerinput.cpp') diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index f163e871c3..dff199d791 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -1212,7 +1212,8 @@ LLViewerInput::Keys::Keys() : first_person("first_person"), third_person("third_person"), sitting("sitting"), - edit_avatar("edit_avatar") + edit_avatar("edit_avatar"), + version("version", 0) {} void LLViewerInput::resetBindings() @@ -1240,6 +1241,16 @@ S32 LLViewerInput::loadBindingsXML(const std::string& filename) binding_count += loadBindingMode(keys.third_person, MODE_THIRD_PERSON); binding_count += loadBindingMode(keys.sitting, MODE_SITTING); binding_count += loadBindingMode(keys.edit_avatar, MODE_EDIT_AVATAR); + + // verify version + if (keys.version < 1) + { + // updating from a version that was not aware of LMouse bindings + for (S32 i = 0; i < MODE_COUNT; i++) + { + mLMouseDefaultHandling[i] = true; + } + } } return binding_count; } -- cgit v1.2.3