From 9c789283111ef0eaf0944b30d3c024926f88de42 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 28 Apr 2020 10:57:17 -0700 Subject: Initial port of the changes from DRTVWR509 (Adult Swim) minus the volume fall-off settings updates --- indra/newview/llappviewer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cbb47d71f7..55728bc366 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3211,12 +3211,16 @@ LLSD LLAppViewer::getViewerInfo() const cef_ver_codec << "."; cef_ver_codec << DULLAHAN_VERSION_MINOR; cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_POINT; + cef_ver_codec << "."; cef_ver_codec << DULLAHAN_VERSION_BUILD; - cef_ver_codec << " / CEF: "; + cef_ver_codec << std::endl; + cef_ver_codec << "CEF: "; cef_ver_codec << CEF_VERSION; - cef_ver_codec << " / Chromium: "; + cef_ver_codec << std::endl; + cef_ver_codec << "Chromium: "; cef_ver_codec << CHROME_VERSION_MAJOR; cef_ver_codec << "."; cef_ver_codec << CHROME_VERSION_MINOR; -- cgit v1.2.3 From 77d2a05921bdba3ac284350650c5394dcc8e3444 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Sun, 3 May 2020 19:03:22 -0700 Subject: Pick up first version of new Dullahan build autobuild scripts that builds CEF wrapper first before building Dullahan. Change to version headers meant a change to appviewer.cpp too. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 55728bc366..8fc9d7ec30 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -127,7 +127,7 @@ #include "llcoros.h" #include "llexception.h" #if !LL_LINUX -#include "cef/dullahan.h" +#include "cef/dullahan_version.h" #include "vlc/libvlc_version.h" #endif // LL_LINUX -- cgit v1.2.3 From 09802fa8ea9c8459e13a32720088f6d6fb1ad42d Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 15 May 2020 18:35:28 -0700 Subject: Tiny text change in the about box - indicates CEF and Chromium are sub-components --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 78cf21ddbb..7c0124322c 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3223,11 +3223,11 @@ LLSD LLAppViewer::getViewerInfo() const cef_ver_codec << DULLAHAN_VERSION_BUILD; cef_ver_codec << std::endl; - cef_ver_codec << "CEF: "; + cef_ver_codec << " CEF: "; cef_ver_codec << CEF_VERSION; cef_ver_codec << std::endl; - cef_ver_codec << "Chromium: "; + cef_ver_codec << " Chromium: "; cef_ver_codec << CHROME_VERSION_MAJOR; cef_ver_codec << "."; cef_ver_codec << CHROME_VERSION_MINOR; -- cgit v1.2.3 From d07ef7df92cbc9c2fb16dcd0ddd0322665d440eb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 15 Jun 2020 18:13:46 +0300 Subject: SL-13418 Added converter from old mouse binding settings to new ones --- indra/newview/llappviewer.cpp | 99 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5630bb1a3f..775b6db94b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -49,6 +49,7 @@ #include "llwindow.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" +#include "llkeyconflict.h" // for legacy keybinding support, remove later #include "llmarketplacefunctions.h" #include "llmarketplacenotifications.h" #include "llmd5.h" @@ -1004,6 +1005,104 @@ bool LLAppViewer::init() // Load User's bindings std::string key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "key_bindings.xml"); +#if 1 + // Legacy support + // Remove #if-#endif section half a year after DRTVWR-501 releases. + // Mouse actions are part of keybinding file since DRTVWR-501 instead of being stored in + // settings.xml. To support legacy viewers that were storing in settings.xml we need to + // transfer old variables to new format. + // Also part of backward compatibility is present in LLKeyConflictHandler to modify + // legacy variables on changes in new system (to make sure we won't enforce + // legacy values again if user dropped to defaults in new system) + if (mIsFirstRun + && !gDirUtilp->fileExists(key_bindings_file)) // if file is missing, assume that there were no changes by user yet + { + // copy mouse actions and voice key changes to new file + LL_INFOS("InitInfo") << "Converting legacy mouse bindings to new format" << LL_ENDL; + // Load settings from file + LLKeyConflictHandler third_person_view(LLKeyConflictHandler::MODE_THIRD_PERSON); + + // Since we are only modifying keybindings if personal file doesn't exist yet, + // it should be safe to just overwrite the value + // If key is already in use somewhere by default, LLKeyConflictHandler should resolve it. + BOOL value = gSavedSettings.getBOOL("DoubleClickAutoPilot"); + third_person_view.registerControl("walk_to", + 0, + value ? EMouseClickType::CLICK_DOUBLELEFT : EMouseClickType::CLICK_NONE, + KEY_NONE, + MASK_NONE, + value); + + U32 index = value ? 1 : 0; // we can store multiple combinations per action, so if first is in use by doubleclick, go to second + value = gSavedSettings.getBOOL("ClickToWalk"); + third_person_view.registerControl("walk_to", + index, + value ? EMouseClickType::CLICK_LEFT : EMouseClickType::CLICK_NONE, + KEY_NONE, + MASK_NONE, + value); + + value = gSavedSettings.getBOOL("DoubleClickTeleport"); + third_person_view.registerControl("teleport_to", + 0, + value ? EMouseClickType::CLICK_DOUBLELEFT : EMouseClickType::CLICK_NONE, + KEY_NONE, + MASK_NONE, + value); + + std::string key_string = gSavedSettings.getString("PushToTalkButton"); + EMouseClickType mouse = EMouseClickType::CLICK_NONE; + KEY key = KEY_NONE; + if (key_string == "MiddleMouse") + { + mouse = EMouseClickType::CLICK_MIDDLE; + } + else if (key_string == "MouseButton4") + { + mouse = EMouseClickType::CLICK_BUTTON4; + } + else if (key_string == "MouseButton5") + { + mouse = EMouseClickType::CLICK_BUTTON5; + } + else + { + LLKeyboard::keyFromString(key_string, &key); + } + + value = gSavedSettings.getBOOL("PushToTalkToggle"); + std::string control_name = value ? "toggle_voice" : "voice_follow_key"; + third_person_view.registerControl(control_name, 0, mouse, key, MASK_NONE, true); + + if (third_person_view.hasUnsavedChanges()) + { + // calls loadBindingsXML() + third_person_view.saveToSettings(); + } + + // in case of voice we need to repeat this in other modes (teleports and + // autopilot are not entirely practical when sitting or editing) + + for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i) + { + if (i != LLKeyConflictHandler::MODE_THIRD_PERSON) + { + LLKeyConflictHandler handler((LLKeyConflictHandler::ESourceMode)i); + + handler.registerControl(control_name, 0, mouse, key, MASK_NONE, true); + + if (handler.hasUnsavedChanges()) + { + // calls loadBindingsXML() + handler.saveToSettings(); + } + } + } + } + // since something might have gone wrong or there might have been nothing to save + // (and because otherwise following code will have to be encased in else{}), + // load everything one last time +#endif if (!gDirUtilp->fileExists(key_bindings_file) || !gViewerInput.loadBindingsXML(key_bindings_file)) { // Failed to load custom bindings, try default ones -- cgit v1.2.3 From 71b66c758e52f6ad79392942646d8db021897dea Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 16 Jun 2020 09:27:41 +0300 Subject: SL-13418 Move and view panel now applies changes on the go --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 775b6db94b..f81f9557ff 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1014,8 +1014,8 @@ bool LLAppViewer::init() // Also part of backward compatibility is present in LLKeyConflictHandler to modify // legacy variables on changes in new system (to make sure we won't enforce // legacy values again if user dropped to defaults in new system) - if (mIsFirstRun - && !gDirUtilp->fileExists(key_bindings_file)) // if file is missing, assume that there were no changes by user yet + if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion + || !gDirUtilp->fileExists(key_bindings_file)) // if file is missing, assume that there were no changes by user yet { // copy mouse actions and voice key changes to new file LL_INFOS("InitInfo") << "Converting legacy mouse bindings to new format" << LL_ENDL; -- cgit v1.2.3 From f8137f68a0f157c7dc7766a695a62d59b4198291 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 23 Jun 2020 16:16:11 +0300 Subject: Reverted SL-6109 keybinding changes Changes were moved to DRTVWR-514 --- indra/newview/llappviewer.cpp | 117 ++++-------------------------------------- 1 file changed, 11 insertions(+), 106 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f81f9557ff..59fc3500d9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -49,7 +49,6 @@ #include "llwindow.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" -#include "llkeyconflict.h" // for legacy keybinding support, remove later #include "llmarketplacefunctions.h" #include "llmarketplacenotifications.h" #include "llmd5.h" @@ -150,7 +149,7 @@ #include "llapr.h" #include -#include "llviewerinput.h" +#include "llviewerkeyboard.h" #include "lllfsthread.h" #include "llworkerthread.h" #include "lltexturecache.h" @@ -1003,113 +1002,20 @@ bool LLAppViewer::init() gGLManager.getGLInfo(gDebugInfo); gGLManager.printGLInfoString(); - // Load User's bindings - std::string key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "key_bindings.xml"); -#if 1 - // Legacy support - // Remove #if-#endif section half a year after DRTVWR-501 releases. - // Mouse actions are part of keybinding file since DRTVWR-501 instead of being stored in - // settings.xml. To support legacy viewers that were storing in settings.xml we need to - // transfer old variables to new format. - // Also part of backward compatibility is present in LLKeyConflictHandler to modify - // legacy variables on changes in new system (to make sure we won't enforce - // legacy values again if user dropped to defaults in new system) - if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion - || !gDirUtilp->fileExists(key_bindings_file)) // if file is missing, assume that there were no changes by user yet - { - // copy mouse actions and voice key changes to new file - LL_INFOS("InitInfo") << "Converting legacy mouse bindings to new format" << LL_ENDL; - // Load settings from file - LLKeyConflictHandler third_person_view(LLKeyConflictHandler::MODE_THIRD_PERSON); - - // Since we are only modifying keybindings if personal file doesn't exist yet, - // it should be safe to just overwrite the value - // If key is already in use somewhere by default, LLKeyConflictHandler should resolve it. - BOOL value = gSavedSettings.getBOOL("DoubleClickAutoPilot"); - third_person_view.registerControl("walk_to", - 0, - value ? EMouseClickType::CLICK_DOUBLELEFT : EMouseClickType::CLICK_NONE, - KEY_NONE, - MASK_NONE, - value); - - U32 index = value ? 1 : 0; // we can store multiple combinations per action, so if first is in use by doubleclick, go to second - value = gSavedSettings.getBOOL("ClickToWalk"); - third_person_view.registerControl("walk_to", - index, - value ? EMouseClickType::CLICK_LEFT : EMouseClickType::CLICK_NONE, - KEY_NONE, - MASK_NONE, - value); - - value = gSavedSettings.getBOOL("DoubleClickTeleport"); - third_person_view.registerControl("teleport_to", - 0, - value ? EMouseClickType::CLICK_DOUBLELEFT : EMouseClickType::CLICK_NONE, - KEY_NONE, - MASK_NONE, - value); - - std::string key_string = gSavedSettings.getString("PushToTalkButton"); - EMouseClickType mouse = EMouseClickType::CLICK_NONE; - KEY key = KEY_NONE; - if (key_string == "MiddleMouse") - { - mouse = EMouseClickType::CLICK_MIDDLE; - } - else if (key_string == "MouseButton4") - { - mouse = EMouseClickType::CLICK_BUTTON4; - } - else if (key_string == "MouseButton5") - { - mouse = EMouseClickType::CLICK_BUTTON5; - } - else - { - LLKeyboard::keyFromString(key_string, &key); - } - - value = gSavedSettings.getBOOL("PushToTalkToggle"); - std::string control_name = value ? "toggle_voice" : "voice_follow_key"; - third_person_view.registerControl(control_name, 0, mouse, key, MASK_NONE, true); - - if (third_person_view.hasUnsavedChanges()) - { - // calls loadBindingsXML() - third_person_view.saveToSettings(); - } - - // in case of voice we need to repeat this in other modes (teleports and - // autopilot are not entirely practical when sitting or editing) - - for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i) - { - if (i != LLKeyConflictHandler::MODE_THIRD_PERSON) - { - LLKeyConflictHandler handler((LLKeyConflictHandler::ESourceMode)i); + // Load Default bindings + std::string key_bindings_file = gDirUtilp->findFile("keys.xml", + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""), + gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); - handler.registerControl(control_name, 0, mouse, key, MASK_NONE, true); - if (handler.hasUnsavedChanges()) - { - // calls loadBindingsXML() - handler.saveToSettings(); - } - } - } - } - // since something might have gone wrong or there might have been nothing to save - // (and because otherwise following code will have to be encased in else{}), - // load everything one last time -#endif - if (!gDirUtilp->fileExists(key_bindings_file) || !gViewerInput.loadBindingsXML(key_bindings_file)) + if (!gViewerKeyboard.loadBindingsXML(key_bindings_file)) { - // Failed to load custom bindings, try default ones - key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "key_bindings.xml"); - if (!gViewerInput.loadBindingsXML(key_bindings_file)) + std::string key_bindings_file = gDirUtilp->findFile("keys.ini", + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""), + gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); + if (!gViewerKeyboard.loadBindings(key_bindings_file)) { - LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL; + LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL; } } @@ -1544,7 +1450,6 @@ bool LLAppViewer::doFrame() { joystick->scanJoystick(); gKeyboard->scanKeyboard(); - gViewerInput.scanMouse(); } // Update state based on messages, user input, object idle. -- cgit v1.2.3