From 16aadcc35430261216aee55732c1580139117ee4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 3 Dec 2020 10:32:57 -0500 Subject: [PATCH] mouse_input: Invert conditional in UpdateYuzuSettings() Allows the struct to be constructed in place. --- src/input_common/mouse/mouse_input.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/input_common/mouse/mouse_input.cpp b/src/input_common/mouse/mouse_input.cpp index b23a7f1cc4..10786a5413 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_) {