diff options
author | german77 <juangerman-13@hotmail.com> | 2021-05-03 01:59:02 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2021-05-03 02:08:33 +0200 |
commit | 6e814735747994a6bae02c833e35dc6648f373bd (patch) | |
tree | ac8805339be3755730779832b024b2dbcbb12b1f /src/input_common/mouse/mouse_input.cpp | |
parent | Merge pull request #6269 from lioncash/file-shadow (diff) | |
download | yuzu-6e814735747994a6bae02c833e35dc6648f373bd.tar yuzu-6e814735747994a6bae02c833e35dc6648f373bd.tar.gz yuzu-6e814735747994a6bae02c833e35dc6648f373bd.tar.bz2 yuzu-6e814735747994a6bae02c833e35dc6648f373bd.tar.lz yuzu-6e814735747994a6bae02c833e35dc6648f373bd.tar.xz yuzu-6e814735747994a6bae02c833e35dc6648f373bd.tar.zst yuzu-6e814735747994a6bae02c833e35dc6648f373bd.zip |
Diffstat (limited to 'src/input_common/mouse/mouse_input.cpp')
-rw-r--r-- | src/input_common/mouse/mouse_input.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input_common/mouse/mouse_input.cpp b/src/input_common/mouse/mouse_input.cpp index fff1c6b45..a335e6da1 100644 --- a/src/input_common/mouse/mouse_input.cpp +++ b/src/input_common/mouse/mouse_input.cpp @@ -143,6 +143,15 @@ void Mouse::ReleaseButton(MouseButton button_) { mouse_info[button_index].data.axis = {0, 0}; } +void Mouse::ReleaseAllButtons() { + buttons = 0; + for (auto& info : mouse_info) { + info.tilt_speed = 0; + info.data.pressed = false; + info.data.axis = {0, 0}; + } +} + void Mouse::BeginConfiguration() { buttons = 0; last_button = MouseButton::Undefined; |