summaryrefslogtreecommitdiffstats
path: root/src/input_common/mouse
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-12-03 16:32:57 +0100
committerLioncash <mathew1800@gmail.com>2020-12-03 16:41:13 +0100
commit16aadcc35430261216aee55732c1580139117ee4 (patch)
tree81f08ad945327372840489fef028e4ff15019673 /src/input_common/mouse
parentmouse_input: Remove two casts and amend some formatting (diff)
downloadyuzu-16aadcc35430261216aee55732c1580139117ee4.tar
yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.gz
yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.bz2
yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.lz
yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.xz
yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.zst
yuzu-16aadcc35430261216aee55732c1580139117ee4.zip
Diffstat (limited to 'src/input_common/mouse')
-rw-r--r--src/input_common/mouse/mouse_input.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/input_common/mouse/mouse_input.cpp b/src/input_common/mouse/mouse_input.cpp
index b23a7f1cc..10786a541 100644
--- a/src/input_common/mouse/mouse_input.cpp
+++ b/src/input_common/mouse/mouse_input.cpp
@@ -41,11 +41,13 @@ void Mouse::UpdateThread() {
}
void Mouse::UpdateYuzuSettings() {
- MouseStatus pad_status{};
- if (buttons != 0) {
- pad_status.button = last_button;
- mouse_queue.Push(pad_status);
+ if (buttons == 0) {
+ return;
}
+
+ mouse_queue.Push(MouseStatus{
+ .button = last_button,
+ });
}
void Mouse::PressButton(int x, int y, int button_) {