aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/llfloaterjoystick.cpp4
-rw-r--r--linden/indra/newview/llviewerjoystick.cpp6
-rw-r--r--linden/indra/newview/llviewerjoystick.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/linden/indra/newview/llfloaterjoystick.cpp b/linden/indra/newview/llfloaterjoystick.cpp
index e581167..05e0564 100644
--- a/linden/indra/newview/llfloaterjoystick.cpp
+++ b/linden/indra/newview/llfloaterjoystick.cpp
@@ -57,6 +57,10 @@ LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
57void LLFloaterJoystick::draw() 57void LLFloaterJoystick::draw()
58{ 58{
59 bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized(); 59 bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized();
60 if (!joystick_inited)
61 {
62 joystick_inited = LLViewerJoystick::getInstance()->init(false);
63 }
60 childSetEnabled("enable_joystick", joystick_inited); 64 childSetEnabled("enable_joystick", joystick_inited);
61 childSetEnabled("joystick_type", joystick_inited); 65 childSetEnabled("joystick_type", joystick_inited);
62 std::string desc = LLViewerJoystick::getInstance()->getDescription(); 66 std::string desc = LLViewerJoystick::getInstance()->getDescription();
diff --git a/linden/indra/newview/llviewerjoystick.cpp b/linden/indra/newview/llviewerjoystick.cpp
index d955a80..617ef13 100644
--- a/linden/indra/newview/llviewerjoystick.cpp
+++ b/linden/indra/newview/llviewerjoystick.cpp
@@ -175,10 +175,11 @@ LLViewerJoystick::~LLViewerJoystick()
175} 175}
176 176
177// ----------------------------------------------------------------------------- 177// -----------------------------------------------------------------------------
178void LLViewerJoystick::init(bool autoenable) 178bool LLViewerJoystick::init(bool autoenable)
179{ 179{
180#if LIB_NDOF 180
181 static bool libinit = false; 181 static bool libinit = false;
182#if LIB_NDOF
182 mDriverState = JDS_INITIALIZING; 183 mDriverState = JDS_INITIALIZING;
183 184
184 if (libinit == false) 185 if (libinit == false)
@@ -275,6 +276,7 @@ void LLViewerJoystick::init(bool autoenable)
275 llinfos << "ndof: mDriverState=" << mDriverState << "; mNdofDev=" 276 llinfos << "ndof: mDriverState=" << mDriverState << "; mNdofDev="
276 << mNdofDev << "; libinit=" << libinit << llendl; 277 << mNdofDev << "; libinit=" << libinit << llendl;
277#endif 278#endif
279 return libinit;
278} 280}
279 281
280// ----------------------------------------------------------------------------- 282// -----------------------------------------------------------------------------
diff --git a/linden/indra/newview/llviewerjoystick.h b/linden/indra/newview/llviewerjoystick.h
index 6be9db3..3718831 100644
--- a/linden/indra/newview/llviewerjoystick.h
+++ b/linden/indra/newview/llviewerjoystick.h
@@ -55,7 +55,7 @@ public:
55 LLViewerJoystick(); 55 LLViewerJoystick();
56 virtual ~LLViewerJoystick(); 56 virtual ~LLViewerJoystick();
57 57
58 void init(bool autoenable); 58 bool init(bool autoenable);
59 void updateStatus(); 59 void updateStatus();
60 void scanJoystick(); 60 void scanJoystick();
61 void moveObjects(bool reset = false); 61 void moveObjects(bool reset = false);