forked from ShuriZma/suyu
1
0
Fork 0

mouse_input: Invert conditional in UpdateYuzuSettings()

Allows the struct to be constructed in place.
This commit is contained in:
Lioncash 2020-12-03 10:32:57 -05:00
parent 395997178b
commit 16aadcc354
1 changed files with 6 additions and 4 deletions

View File

@ -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_) {