diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 48 | ||||
-rw-r--r-- | indra/newview/llflycam.cpp | 4 |
4 files changed, 29 insertions, 29 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index b7257a6c50..ca35608175 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4989,6 +4989,7 @@ static S32 g_deltaFrame { 0 }; void LLAgent::applyExternalActionFlags(U32 outer_flags) { + llassert(LLCoros::on_main_thread_main_coro()); assert(LLGameControl::isEnabled() && LLGameControl::willControlAvatar()); mExternalActionFlags = outer_flags; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ec725a8ace..0c96c93d31 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -647,7 +647,7 @@ void LLFloaterPreference::cancel(const std::vector<std::string> settings_to_skip { if (LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view)) { - panel->cancel(); + panel->cancel(settings_to_skip); } } // hide joystick pref floater @@ -3223,8 +3223,6 @@ void LLPanelPreferenceGameControl::saveSettings() }; // Use string formatting functions provided by class LLGameControl: - // stringifyAnalogMappings(), stringifyBinaryMappings(), stringifyFlycamMappings() - if (LLControlVariable* analogMappings = gSavedSettings.getControl("AnalogChannelMappings")) { analogMappings->set(LLGameControl::stringifyAnalogMappings(getChannel)); @@ -3496,6 +3494,7 @@ void LLPanelPreferenceGameControl::onCommitNumericValue() deviceOptions.getAxisOptions()[row_index].mOffset = (S16)value; } setNumericLabel(row->getColumn(column_index), value); + LLGameControl::setDeviceOptions(mSelectedDeviceGUID, deviceOptions); } } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 33d1cb0c87..e06e758e3a 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -447,38 +447,38 @@ private: void resetButtonMappingsToDefaults(); // Above the tab container - LLCheckBoxCtrl* mCheckGameControlToServer; // send game_control data to server - LLCheckBoxCtrl* mCheckGameControlToAgent; // use game_control data to move avatar - LLCheckBoxCtrl* mCheckAgentToGameControl; // translate external avatar actions to game_control data + LLCheckBoxCtrl* mCheckGameControlToServer { nullptr }; // send game_control data to server + LLCheckBoxCtrl* mCheckGameControlToAgent { nullptr }; // use game_control data to move avatar + LLCheckBoxCtrl* mCheckAgentToGameControl { nullptr }; // translate external avatar actions to game_control data // 1st tab "Channel mappings" - LLPanel* mTabChannelMappings; - LLScrollListCtrl* mActionTable; + LLPanel* mTabChannelMappings { nullptr }; + LLScrollListCtrl* mActionTable { nullptr }; // 2nd tab "Device settings" - LLPanel* mTabDeviceSettings; - LLTextBox* mNoDeviceMessage; - LLTextBox* mDevicePrompt; - LLTextBox* mSingleDevice; - LLComboBox* mDeviceList; - LLCheckBoxCtrl* mCheckShowAllDevices; - LLPanel* mPanelDeviceSettings; - LLPanel* mTabAxisOptions; - LLScrollListCtrl* mAxisOptions; - LLPanel* mTabAxisMappings; - LLScrollListCtrl* mAxisMappings; - LLPanel* mTabButtonMappings; - LLScrollListCtrl* mButtonMappings; - - LLButton* mResetToDefaults; + LLPanel* mTabDeviceSettings { nullptr }; + LLTextBox* mNoDeviceMessage { nullptr }; + LLTextBox* mDevicePrompt { nullptr }; + LLTextBox* mSingleDevice { nullptr }; + LLComboBox* mDeviceList { nullptr }; + LLCheckBoxCtrl* mCheckShowAllDevices { nullptr }; + LLPanel* mPanelDeviceSettings { nullptr }; + LLPanel* mTabAxisOptions { nullptr }; + LLScrollListCtrl* mAxisOptions { nullptr }; + LLPanel* mTabAxisMappings { nullptr }; + LLScrollListCtrl* mAxisMappings { nullptr }; + LLPanel* mTabButtonMappings { nullptr }; + LLScrollListCtrl* mButtonMappings { nullptr }; + + LLButton* mResetToDefaults { nullptr }; // Numeric value editor - LLSpinCtrl* mNumericValueEditor; + LLSpinCtrl* mNumericValueEditor { nullptr }; // Channel selectors - LLComboBox* mAnalogChannelSelector; - LLComboBox* mBinaryChannelSelector; - LLComboBox* mAxisSelector; + LLComboBox* mAnalogChannelSelector { nullptr }; + LLComboBox* mBinaryChannelSelector { nullptr }; + LLComboBox* mAxisSelector { nullptr }; struct DeviceOptions { diff --git a/indra/newview/llflycam.cpp b/indra/newview/llflycam.cpp index 9bd854a3cc..eb5bfecf73 100644 --- a/indra/newview/llflycam.cpp +++ b/indra/newview/llflycam.cpp @@ -51,7 +51,7 @@ void LLFlycam::getTransform(LLVector3& position_out, LLQuaternion& rotation_out) // 'view' is expected to be in radians void LLFlycam::setView(F32 view) { - mView = std::min(std::max(view, MIN_FIELD_OF_VIEW), MAX_FIELD_OF_VIEW); + mView = std::clamp(view, MIN_FIELD_OF_VIEW, MAX_FIELD_OF_VIEW); } @@ -126,7 +126,7 @@ void LLFlycam::integrate(F32 delta_time) { // Note: we subtract the delta because "positive" zoom (e.g. "zoom in") // produces smaller view angle - mView = std::min(std::max(mView - delta_time * mZoomRate, MIN_FIELD_OF_VIEW), MAX_FIELD_OF_VIEW); + mView = std::clamp(mView - delta_time * mZoomRate, MIN_FIELD_OF_VIEW, MAX_FIELD_OF_VIEW); } if (needs_renormalization) |