diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 94035de94ca70ea06acbe18f3e8862992162643a..9471113e9bf53b8dce268b4678902e429c32f431 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -330,7 +330,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera) { changeCameraToDefault(); - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { handle_toggle_flycam(); } @@ -338,7 +338,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera) // reset avatar mode from eventual residual motion if (LLToolMgr::getInstanceFast()->inBuildMode()) { - LLViewerJoystick::getInstance()->moveAvatar(true); + LLViewerJoystick::getInstanceFast()->moveAvatar(true); } //Camera Tool is needed for Free Camera Control Mode @@ -1377,7 +1377,7 @@ void LLAgentCamera::updateCamera() mFollowCam.copyParams(*current_cam); mFollowCam.setSubjectPositionAndRotation( gAgentAvatarp->getRenderPosition(), avatarRotationForFollowCam ); mFollowCam.update(); - LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); + LLViewerJoystick::getInstanceFast()->setCameraNeedsUpdate(true); } else { @@ -2334,7 +2334,7 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate) || ( (RlvActions::isRlvEnabled()) && (!RlvActions::canChangeToMouselook()) ) // [/RLVa:KB] - || LLViewerJoystick::getInstance()->getOverrideCamera()) + || LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { return; } @@ -2394,12 +2394,12 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate) //----------------------------------------------------------------------------- void LLAgentCamera::changeCameraToDefault() { - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { return; } - if (LLFollowCamMgr::getInstance()->getActiveFollowCamParams()) + if (LLFollowCamMgr::getInstanceFast()->getActiveFollowCamParams()) { changeCameraToFollow(); } @@ -2420,7 +2420,7 @@ void LLAgentCamera::changeCameraToDefault() //----------------------------------------------------------------------------- void LLAgentCamera::changeCameraToFollow(BOOL animate) { - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { return; } @@ -2475,7 +2475,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate) //----------------------------------------------------------------------------- void LLAgentCamera::changeCameraToThirdPerson(BOOL animate) { - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { return; } @@ -2546,7 +2546,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate) //----------------------------------------------------------------------------- void LLAgentCamera::changeCameraToCustomizeAvatar() { - if (LLViewerJoystick::getInstance()->getOverrideCamera() || !isAgentAvatarValid()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera() || !isAgentAvatarValid()) { return; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2ede599d4dcddee13b7dbf6694e2a118e15100a1..4a0cf4032326d43b9feccf36fde32bcaeda12b96 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4958,22 +4958,22 @@ void LLAppViewer::idle() { gAgentPilot.moveCamera(); } - else if (LLViewerJoystick::getInstance()->getOverrideCamera()) + else if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { - LLViewerJoystick::getInstance()->moveFlycam(); + LLViewerJoystick::getInstanceFast()->moveFlycam(); } else { if (LLToolMgr::getInstanceFast()->inBuildMode()) { - LLViewerJoystick::getInstance()->moveObjects(); + LLViewerJoystick::getInstanceFast()->moveObjects(); } gAgentCamera.updateCamera(); } // update media focus - LLViewerMediaFocus::getInstance()->update(); + LLViewerMediaFocus::getInstanceFast()->update(); // Update marketplace LLMarketplaceInventoryImporter::update(); diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index 9bf94868c18b641c52e10f68716472d890e2c5bb..12630da2a01ec5c0ee5e5cc87d6e73a73790541d 100644 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -195,7 +195,7 @@ BOOL LLTool::handleKey(KEY key, MASK mask) LLTool* LLTool::getOverrideTool(MASK mask) { // NOTE: if in flycam mode, ALT-ZOOM camera should be disabled - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { return NULL; } @@ -205,7 +205,7 @@ LLTool* LLTool::getOverrideTool(MASK mask) { if (mask & MASK_ALT) { - return LLToolCamera::getInstance(); + return LLToolCamera::getInstanceFast(); } } return NULL; diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 39e588d9e0c2b439a0b83912e20ff70145654247..8cb024140d4555a6abdd13121f4bc8944dabf1b9 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -325,7 +325,7 @@ void LLToolMgr::enterBuildMode(bool verify_canedit /*=false*/) if (gSavedSettings.getBOOL("EditCameraMovement")) { // camera should be set - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { handle_toggle_flycam(); } @@ -342,7 +342,7 @@ void LLToolMgr::enterBuildMode(bool verify_canedit /*=false*/) setCurrentToolset(gBasicToolset); - getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); + getCurrentToolset()->selectTool( LLToolCompCreate::getInstanceFast() ); // Could be first use //LLFirstUse::useBuild(); @@ -350,7 +350,7 @@ void LLToolMgr::enterBuildMode(bool verify_canedit /*=false*/) gAgentCamera.resetView(false); // avoid spurious avatar movements - LLViewerJoystick::getInstance()->setNeedsReset(); + LLViewerJoystick::getInstanceFast()->setNeedsReset(); } // [RLVa:KB] - Checked: RLVa-2.1.0 @@ -381,7 +381,7 @@ void LLToolMgr::leaveBuildMode() gViewerWindow->showCursor(); } // avoid spurious avatar movements pulling out of edit mode - LLViewerJoystick::getInstance()->setNeedsReset(); + LLViewerJoystick::getInstanceFast()->setNeedsReset(); } } diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 0ef30917aa7f584f6235329f1e52273d49cf7f55..8b4521ae2bfa231774a657e7d9dcee3e35fa98d8 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -109,7 +109,7 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, const LLVector3 &point_of_interest) { // do not update if avatar didn't move - if (!LLViewerJoystick::getInstance()->getCameraNeedsUpdate()) + if (!LLViewerJoystick::getInstanceFast()->getCameraNeedsUpdate()) { return; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 49bc105bf0ba314322955160a4376b18fcd9a620..f259e5a5cd174f92efec0992c3eb22c8612e4ed6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2818,14 +2818,14 @@ class LLViewCheckJoystickFlycam : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = LLViewerJoystick::getInstance()->getOverrideCamera(); + bool new_value = LLViewerJoystick::getInstanceFast()->getOverrideCamera(); return new_value; } }; void handle_toggle_flycam() { - LLViewerJoystick::getInstance()->toggleFlycam(); + LLViewerJoystick::getInstanceFast()->toggleFlycam(); } class LLObjectBuild : public view_listener_t @@ -2892,8 +2892,8 @@ void handle_object_edit() LLToolMgr::getInstanceFast()->setCurrentToolset(gBasicToolset); gFloaterTools->setEditTool( LLToolCompTranslate::getInstanceFast() ); - LLViewerJoystick::getInstance()->moveObjects(true); - LLViewerJoystick::getInstance()->setNeedsReset(true); + LLViewerJoystick::getInstanceFast()->moveObjects(true); + LLViewerJoystick::getInstanceFast()->setNeedsReset(true); // Could be first use //LLFirstUse::useBuild(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9d4cd26a0b3cd653d41ddc5b5413e0649f8ff0bc..35996663f5f0d2857139e007790ed3f316ca5ebe 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6524,7 +6524,7 @@ void process_teleport_local(LLMessageSystem *msg,void**) gAgent.setPositionAgent(pos); gAgentCamera.slamLookAt(look_at); - if ( !(gAgent.getTeleportKeepsLookAt() && LLViewerJoystick::getInstance()->getOverrideCamera()) ) + if ( !(gAgent.getTeleportKeepsLookAt() && LLViewerJoystick::getInstanceFast()->getOverrideCamera()) ) { gAgentCamera.resetView(TRUE, TRUE); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 71aa7437a6655caeadd6d5f71179aec8af8366e2..c23b4ab240eaafd6edcfb7cfb33fb9aaa7a5cdae 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1657,7 +1657,7 @@ BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask) void LLViewerWindow::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) { - LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); + LLViewerJoystick::getInstanceFast()->setCameraNeedsUpdate(true); gViewerInput.scanKey(key, key_down, key_up, key_level); return; // Be clear this function returns nothing } @@ -1704,7 +1704,7 @@ BOOL LLViewerWindow::handleActivateApp(LLWindow *window, BOOL activating) { //if (!activating) gAgentCamera.changeCameraToDefault(); - LLViewerJoystick::getInstance()->setNeedsReset(true); + LLViewerJoystick::getInstanceFast()->setNeedsReset(true); return FALSE; } @@ -1800,9 +1800,9 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) BOOL LLViewerWindow::handleTimerEvent(LLWindow *window) { - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + if (LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { - LLViewerJoystick::getInstance()->updateStatus(); + LLViewerJoystick::getInstanceFast()->updateStatus(); return TRUE; } return FALSE; @@ -1811,9 +1811,9 @@ BOOL LLViewerWindow::handleTimerEvent(LLWindow *window) BOOL LLViewerWindow::handleDeviceChange(LLWindow *window) { // give a chance to use a joystick after startup (hot-plugging) - if (!LLViewerJoystick::getInstance()->isJoystickInitialized() ) + if (!LLViewerJoystick::getInstanceFast()->isJoystickInitialized() ) { - LLViewerJoystick::getInstance()->init(true); + LLViewerJoystick::getInstanceFast()->init(true); return TRUE; } return FALSE; @@ -4488,7 +4488,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLVector3 mouse_world_start = mouse_point_global; LLVector3 mouse_world_end = mouse_point_global + mouse_direction_global * depth; - if (!LLViewerJoystick::getInstance()->getOverrideCamera()) + if (!LLViewerJoystick::getInstanceFast()->getOverrideCamera()) { //always set raycast intersection to mouse_world_end unless //flycam is on (for DoF effect) gDebugRaycastIntersection.load3(mouse_world_end.mV);