aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/drivers/mouse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/drivers/mouse.cpp')
-rw-r--r--src/input_common/drivers/mouse.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp
index 7e029d2cdf..00b7220c1e 100644
--- a/src/input_common/drivers/mouse.cpp
+++ b/src/input_common/drivers/mouse.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -72,15 +72,6 @@ Mouse::Mouse(std::string input_engine_) : InputEngine(std::move(input_engine_))
wheel_position = {};
last_mouse_change = {};
last_motion_change = {};
-
- update_thread = std::jthread([this](std::stop_token stop_token) {
- Common::SetCurrentThreadName("Mouse");
- while (!stop_token.stop_requested()) {
- UpdateStickInput();
- UpdateMotionInput();
- std::this_thread::sleep_for(std::chrono::milliseconds(update_time));
- }
- });
}
void Mouse::UpdateStickInput() {
@@ -185,6 +176,11 @@ void Mouse::Move(int x, int y, int center_x, int center_y) {
}
}
+void Mouse::NotifyChanged() {
+ UpdateStickInput();
+ UpdateMotionInput();
+}
+
void Mouse::MouseMove(f32 touch_x, f32 touch_y) {
SetAxis(real_mouse_identifier, mouse_axis_x, touch_x);
SetAxis(real_mouse_identifier, mouse_axis_y, touch_y);