diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterjoystick.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloaterjoystick.cpp b/linden/indra/newview/llfloaterjoystick.cpp index 05e0564..960eebb 100644 --- a/linden/indra/newview/llfloaterjoystick.cpp +++ b/linden/indra/newview/llfloaterjoystick.cpp | |||
@@ -59,7 +59,7 @@ void LLFloaterJoystick::draw() | |||
59 | bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized(); | 59 | bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized(); |
60 | if (!joystick_inited) | 60 | if (!joystick_inited) |
61 | { | 61 | { |
62 | joystick_inited = LLViewerJoystick::getInstance()->init(false); | 62 | joystick_inited = LLViewerJoystick::getInstance()->init(); |
63 | } | 63 | } |
64 | childSetEnabled("enable_joystick", joystick_inited); | 64 | childSetEnabled("enable_joystick", joystick_inited); |
65 | childSetEnabled("joystick_type", joystick_inited); | 65 | childSetEnabled("joystick_type", joystick_inited); |
@@ -147,8 +147,21 @@ void LLFloaterJoystick::refresh() | |||
147 | { | 147 | { |
148 | LLFloater::refresh(); | 148 | LLFloater::refresh(); |
149 | 149 | ||
150 | bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized(); | ||
151 | if (!joystick_inited) | ||
152 | { | ||
153 | joystick_inited = LLViewerJoystick::getInstance()->init(); | ||
154 | } | ||
155 | |||
156 | mJoystickAutoEnable = gSavedSettings.getBOOL("JoystickAutoEnable"); | ||
157 | if (mJoystickAutoEnable && joystick_inited) | ||
158 | { | ||
159 | gSavedSettings.setBOOL("JoystickEnabled",true); | ||
160 | } | ||
161 | |||
150 | mJoystickEnabled = gSavedSettings.getBOOL("JoystickEnabled"); | 162 | mJoystickEnabled = gSavedSettings.getBOOL("JoystickEnabled"); |
151 | 163 | ||
164 | |||
152 | mJoystickAxis[0] = gSavedSettings.getS32("JoystickAxis0"); | 165 | mJoystickAxis[0] = gSavedSettings.getS32("JoystickAxis0"); |
153 | mJoystickAxis[1] = gSavedSettings.getS32("JoystickAxis1"); | 166 | mJoystickAxis[1] = gSavedSettings.getS32("JoystickAxis1"); |
154 | mJoystickAxis[2] = gSavedSettings.getS32("JoystickAxis2"); | 167 | mJoystickAxis[2] = gSavedSettings.getS32("JoystickAxis2"); |
@@ -217,6 +230,7 @@ void LLFloaterJoystick::refresh() | |||
217 | void LLFloaterJoystick::cancel() | 230 | void LLFloaterJoystick::cancel() |
218 | { | 231 | { |
219 | gSavedSettings.setBOOL("JoystickEnabled", mJoystickEnabled); | 232 | gSavedSettings.setBOOL("JoystickEnabled", mJoystickEnabled); |
233 | gSavedSettings.setBOOL("JoystickAutoEnable", mJoystickAutoEnable); | ||
220 | 234 | ||
221 | gSavedSettings.setS32("JoystickAxis0", mJoystickAxis[0]); | 235 | gSavedSettings.setS32("JoystickAxis0", mJoystickAxis[0]); |
222 | gSavedSettings.setS32("JoystickAxis1", mJoystickAxis[1]); | 236 | gSavedSettings.setS32("JoystickAxis1", mJoystickAxis[1]); |