diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2024-04-15 14:51:06 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2024-04-15 14:52:26 -0500 |
| commit | 31dc3477ad9cdcc4ba3259f8c7373e2981c13ff3 (patch) | |
| tree | 00a0bfa96a81cc948862e2ed602bd13fddb1b42e /Source/Core/InputCommon/ControllerEmu | |
| parent | dbc7e035773d97293f572b9fe15fdcb877fc3965 (diff) | |
DolphinQt/Mapping: Disable relative input when "Mouse Controlled Pointing" button is pressed.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu')
3 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp index 98784c00ae..0ba4bfa3ea 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp @@ -181,6 +181,11 @@ ControlState Cursor::GetVerticalOffset() const return m_vertical_offset_setting.GetValue() / 100; } +void Cursor::SetRelativeInput(bool value) +{ + m_relative_setting.SetValue(value); +} + bool Cursor::StateData::IsVisible() const { return !std::isnan(x); diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h index 3710a40d92..7b2e5f581c 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h @@ -40,6 +40,8 @@ public: // Vertical offset in meters. ControlState GetVerticalOffset() const; + void SetRelativeInput(bool enabled); + private: Cursor::StateData UpdateState(Cursor::ReshapeData input); diff --git a/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h b/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h index b102b062e7..863e211cae 100644 --- a/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h +++ b/Source/Core/InputCommon/ControllerEmu/Setting/NumericSetting.h @@ -186,7 +186,6 @@ public: bool IsSimpleValue() const { return m_input.GetExpression().empty(); } -private: void SetValue(ValueType value) { m_value = value; @@ -195,6 +194,7 @@ private: m_input.SetExpression(""); } +private: // Values are R/W by both UI and CPU threads. mutable std::atomic<ValueType> m_value = {}; |
