diff options
| author | Tilka <tilkax@gmail.com> | 2024-04-20 14:14:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-20 14:14:03 +0100 |
| commit | 20665ebce715165c9e126a0c43dddb2453d26535 (patch) | |
| tree | 1d293099078ef29e2241c8d72aaef06b91110b15 /Source/Core/InputCommon/ControllerEmu/ControlGroup | |
| parent | f384d2f958a0d9d81bf61b67a3569503a0d7d04a (diff) | |
| parent | 31dc3477ad9cdcc4ba3259f8c7373e2981c13ff3 (diff) | |
Merge pull request #12710 from jordan-woyak/mouse-pointing-disable-relative
DolphinQt/Mapping: Disable relative input when "Mouse Controlled Pointing" button is pressed.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.h | 2 |
2 files changed, 7 insertions, 0 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); |
