diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-12-29 19:16:15 +0200 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-10-23 15:26:19 +0300 |
commit | 3084f864176dffbc5da19e6f958a55513f63e795 (patch) | |
tree | ad164425f7f223879b5249d77e9c7c43cd757487 /indra/newview/llfloaterjoystick.cpp | |
parent | 6481d36c69dbcafdb23cb27dc07aa047b3d7d64e (diff) |
SL-13610 [MAC] Manufacturer based search
Diffstat (limited to 'indra/newview/llfloaterjoystick.cpp')
-rw-r--r-- | indra/newview/llfloaterjoystick.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 18e5858e8d..d3add020cf 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -250,7 +250,7 @@ void LLFloaterJoystick::refresh() initFromSettings(); } -bool LLFloaterJoystick::addDeviceCallback(std::string &name, LLSD::Binary& value, void* userdata) +bool LLFloaterJoystick::addDeviceCallback(std::string &name, LLSD& value, void* userdata) { LLFloaterJoystick * floater = (LLFloaterJoystick*)userdata; floater->mJoysticksCombo->add(name, value, ADD_BOTTOM, 1); @@ -280,9 +280,9 @@ void LLFloaterJoystick::refreshListOfDevices() #elif LL_DARWIN U32 device_type = 0; #else - // MAC doesn't support device search yet - // On MAC there is an ndof_idsearch and it is possible to specify product - // and manufacturer in NDOF_Device for ndof_init_first to pick specific one + // On MAC it is possible to specify product + // and manufacturer in NDOF_Device for + // ndof_init_first to pick specific device U32 device_type = 0; #endif if (gViewerWindow->getWindow()->getInputDevices(device_type, addDeviceCallback, win_calback, this)) @@ -427,10 +427,11 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel) joystick->toggleFlycam(); } } - - std::string device_id = LLViewerJoystick::getInstance()->getDeviceUUIDString(); - gSavedSettings.setString("JoystickDeviceUUID", device_id); - LL_DEBUGS("Joystick") << "Selected " << device_id << " as joystick." << LL_ENDL; + + LLViewerJoystick::getInstance()->saveDeviceIdToSettings(); + + std::string device_string = LLViewerJoystick::getInstance()->getDeviceUUIDString(); + LL_DEBUGS("Joystick") << "Selected " << device_string << " as joystick." << LL_ENDL; self->refreshListOfDevices(); } |