From 6b177f923a2f70f4f452b1a70aa4e0ed2f7854fd Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 15 Jun 2010 19:42:08 +0200 Subject: a few tweaks to joystick code * switch joystick enabled if plugged in at startup * leave flycam mode if going to mouselook (instead of doing nothing) * leave flycam mode on reset view [esc] (instead of doing nothing) --- linden/indra/newview/llagent.cpp | 4 ++-- linden/indra/newview/llviewerjoystick.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index e8ee2a1..ef05fae 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -4068,7 +4068,7 @@ void LLAgent::changeCameraToMouselook(BOOL animate) { if (LLViewerJoystick::getInstance()->getOverrideCamera()) { - return; + LLViewerJoystick::getInstance()->setOverrideCamera(false); } // visibility changes at end of animation @@ -4131,7 +4131,7 @@ void LLAgent::changeCameraToDefault() { if (LLViewerJoystick::getInstance()->getOverrideCamera()) { - return; + LLViewerJoystick::getInstance()->setOverrideCamera(false); } if (LLFollowCamMgr::getActiveFollowCamParams()) diff --git a/linden/indra/newview/llviewerjoystick.cpp b/linden/indra/newview/llviewerjoystick.cpp index 652e50e..d955a80 100644 --- a/linden/indra/newview/llviewerjoystick.cpp +++ b/linden/indra/newview/llviewerjoystick.cpp @@ -264,6 +264,8 @@ void LLViewerJoystick::init(bool autoenable) // It's not a Space Navigator gSavedSettings.setString("JoystickInitialized", "UnknownDevice"); } + + gSavedSettings.setBOOL("JoystickEnabled", TRUE ); } else { -- cgit v1.1