From a9d86c8133960635bc8a116f68348bf447a39690 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:52:15 -0800 Subject: CID-378 Checker: UNINIT_CTOR Function: LLFloaterJoystick::LLFloaterJoystick(const LLSD &) File: /indra/newview/llfloaterjoystick.cpp --- indra/newview/llfloaterjoystick.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterjoystick.cpp') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 06fe2a84c8..78bc63ac8c 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -52,6 +52,7 @@ LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml"); + initFromSettings(); } void LLFloaterJoystick::draw() @@ -123,10 +124,8 @@ void LLFloaterJoystick::apply() { } -void LLFloaterJoystick::refresh() +void LLFloaterJoystick::initFromSettings() { - LLFloater::refresh(); - mJoystickEnabled = gSavedSettings.getBOOL("JoystickEnabled"); mJoystickAxis[0] = gSavedSettings.getS32("JoystickAxis0"); @@ -194,6 +193,12 @@ void LLFloaterJoystick::refresh() mFlycamFeathering = gSavedSettings.getF32("FlycamFeathering"); } +void LLFloaterJoystick::refresh() +{ + LLFloater::refresh(); + initFromSettings(); +} + void LLFloaterJoystick::cancel() { gSavedSettings.setBOOL("JoystickEnabled", mJoystickEnabled); -- cgit v1.2.3