diff options
| author | 2020-12-03 10:32:57 -0500 | |
|---|---|---|
| committer | 2020-12-03 10:41:13 -0500 | |
| commit | 16aadcc35430261216aee55732c1580139117ee4 (patch) | |
| tree | 81f08ad945327372840489fef028e4ff15019673 /src/input_common/mouse/mouse_input.cpp | |
| parent | mouse_input: Remove two casts and amend some formatting (diff) | |
| download | yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.gz yuzu-16aadcc35430261216aee55732c1580139117ee4.tar.xz yuzu-16aadcc35430261216aee55732c1580139117ee4.zip | |
mouse_input: Invert conditional in UpdateYuzuSettings()
Allows the struct to be constructed in place.
Diffstat (limited to 'src/input_common/mouse/mouse_input.cpp')
| -rw-r--r-- | src/input_common/mouse/mouse_input.cpp | 10 |
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() { | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | void Mouse::UpdateYuzuSettings() { | 43 | void Mouse::UpdateYuzuSettings() { |
| 44 | MouseStatus pad_status{}; | 44 | if (buttons == 0) { |
| 45 | if (buttons != 0) { | 45 | return; |
| 46 | pad_status.button = last_button; | ||
| 47 | mouse_queue.Push(pad_status); | ||
| 48 | } | 46 | } |
| 47 | |||
| 48 | mouse_queue.Push(MouseStatus{ | ||
| 49 | .button = last_button, | ||
| 50 | }); | ||
| 49 | } | 51 | } |
| 50 | 52 | ||
| 51 | void Mouse::PressButton(int x, int y, int button_) { | 53 | void Mouse::PressButton(int x, int y, int button_) { |