diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-06-29 14:00:50 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-06-29 14:00:50 -0700 |
commit | 36fd0f7ca932cce5cd3614c16cd26aceedf57952 (patch) | |
tree | ada1b461d97bf75b016a13bbc30c070ee74a1183 /indra/newview/llfloaterjoystick.cpp | |
parent | 78e3edba6e998d8e97a1bff952073f62e58fd379 (diff) | |
parent | 069304ca394d4d6069f00bb976f2d75e82bf675c (diff) |
Merge branch 'DRTVWR-559' of bitbucket.org:lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llfloaterjoystick.cpp')
-rw-r--r-- | indra/newview/llfloaterjoystick.cpp | 7 |
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); |