summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterjoystick.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 93a26f31cc..558b14bba7 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -292,7 +292,7 @@ void LLFloaterJoystick::refreshListOfDevices()
std::string desc = LLViewerJoystick::getInstance()->getDescription();
if (!desc.empty())
{
- LLSD value = LLSD::Integer(0);
+ LLSD value = LLSD::Integer(1); // value for selection
addDevice(desc, value);
mHasDeviceList = true;
}
@@ -392,6 +392,9 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
LLSD value = self->mJoysticksCombo->getValue();
bool joystick_enabled = true;
+ // value is 0 for no device,
+ // 1 for a device on Mac (single device, no list support yet)
+ // binary packed guid for a device on windows (can have multiple devices)
if (value.isInteger())
{
// ndof already has a device selected, we are just setting it enabled or disabled
@@ -400,7 +403,7 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
else
{
LLViewerJoystick::getInstance()->initDevice(value);
- // else joystick is enabled, because combobox holds id of device
+ // else joystick is enabled, because combobox holds id of the device
joystick_enabled = true;
}
gSavedSettings.setBOOL("JoystickEnabled", joystick_enabled);