diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-07-26 05:11:03 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-07-26 05:11:03 +0200 |
| commit | 39763e7321fa17486f1b466a1777f8aa4a91949f (patch) | |
| tree | 19b0481fb690bea4852705d3c0e760c12fa313ac /src/input_common/drivers/mouse.cpp | |
| parent | e69415c07bd06a2a26faac8bf343b883541a1006 (diff) | |
[core/hle/services/am] nuke ButtonPoller and Mouse thread (#4229)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
doesn't even do anything now, please check if controller i/o is affected by this change
this should also fix latency issues with the mouse
the ButtonPoller thread isn't longer required since we update the state immediately with the .on_change callback registered
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4229
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src/input_common/drivers/mouse.cpp')
| -rw-r--r-- | src/input_common/drivers/mouse.cpp | 16 |
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); |
