diff options
| author | 2023-05-05 17:11:53 -0600 | |
|---|---|---|
| committer | 2023-05-05 17:18:35 -0600 | |
| commit | f017335fef95d2cecc0fcda185f0e59cc1945101 (patch) | |
| tree | 3c119e1e6f51506e039a519b0baf245ae9b41747 /src/input_common/input_engine.cpp | |
| parent | yuzu: Add motion preview to controller input (diff) | |
| download | yuzu-f017335fef95d2cecc0fcda185f0e59cc1945101.tar.gz yuzu-f017335fef95d2cecc0fcda185f0e59cc1945101.tar.xz yuzu-f017335fef95d2cecc0fcda185f0e59cc1945101.zip | |
input_common: Add property to invert an axis button
Diffstat (limited to '')
| -rw-r--r-- | src/input_common/input_engine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input_common/input_engine.cpp b/src/input_common/input_engine.cpp index 91aa96aa7..49f5e7f54 100644 --- a/src/input_common/input_engine.cpp +++ b/src/input_common/input_engine.cpp | |||
| @@ -58,6 +58,8 @@ void InputEngine::SetHatButton(const PadIdentifier& identifier, int button, u8 v | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | void InputEngine::SetAxis(const PadIdentifier& identifier, int axis, f32 value) { | 60 | void InputEngine::SetAxis(const PadIdentifier& identifier, int axis, f32 value) { |
| 61 | value /= 2.0f; | ||
| 62 | value -= 0.5f; | ||
| 61 | { | 63 | { |
| 62 | std::scoped_lock lock{mutex}; | 64 | std::scoped_lock lock{mutex}; |
| 63 | ControllerData& controller = controller_list.at(identifier); | 65 | ControllerData& controller = controller_list.at(identifier); |