diff options
| author | Richard Linden <none@none> | 2010-09-30 16:43:44 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2010-09-30 16:43:44 -0700 |
| commit | 7f003fa20df6ed60532271084696076ee61128de (patch) | |
| tree | ba15a23550f22014bb9fcd81e69019f8c1cdd411 /indra/newview/llappviewer.cpp | |
| parent | e7834520c725de122f2e62387e2563723735ab4e (diff) | |
converted keys.ini to keys.xml and use LLInitParam parsing
Diffstat (limited to 'indra/newview/llappviewer.cpp')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 956f67df86..a9bdabe794 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -820,16 +820,22 @@ bool LLAppViewer::init() gGLManager.getGLInfo(gDebugInfo); gGLManager.printGLInfoString(); - //load key settings - bind_keyboard_functions(); - // Load Default bindings - if (!gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keys.ini"))) + std::string key_bindings_file = gDirUtilp->findFile("keys.xml", + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""), + gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); + + + if (!gViewerKeyboard.loadBindingsXML(key_bindings_file)) { - LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL; + 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 keys.ini" << LL_ENDL; + } } - // Load Custom bindings (override defaults) - gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"custom_keys.ini")); // If we don't have the right GL requirements, exit. if (!gGLManager.mHasRequirements && !gNoRender) |
