diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-29 18:00:26 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-29 18:00:26 -0500 |
commit | 56ae3e0a083aefcbd6d7c955bb2c7e9e58000a4b (patch) | |
tree | 53ad2998536760442a00b1d239a7223e864ba3c9 /indra/newview/llfloaterjoystick.cpp | |
parent | fd6b5ea8c3df7e8b4b648ac7ecc9f30eedd4b7c0 (diff) | |
parent | 36fd0f7ca932cce5cd3614c16cd26aceedf57952 (diff) |
Merge branch 'DRTVWR-559' of ssh://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); |