[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>
This commit is contained in:
lizzie
2026-07-26 05:11:03 +02:00
committed by crueter
parent e69415c07b
commit 39763e7321
8 changed files with 21 additions and 35 deletions
+6 -1
View File
@@ -487,6 +487,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
input_subsystem->GetMouse()->PressMouseButton(button);
input_subsystem->GetMouse()->PressButton(pos.x(), pos.y(), button);
input_subsystem->GetMouse()->PressTouchButton(touch_x, touch_y, button);
input_subsystem->GetMouse()->NotifyChanged();
emit MouseActivity();
}
@@ -507,6 +508,7 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
input_subsystem->GetMouse()->MouseMove(touch_x, touch_y);
input_subsystem->GetMouse()->TouchMove(touch_x, touch_y);
input_subsystem->GetMouse()->Move(pos.x(), pos.y(), center_x, center_y);
input_subsystem->GetMouse()->NotifyChanged();
// Center mouse for mouse panning
if (Settings::values.mouse_panning && !Settings::values.mouse_enabled) {
@@ -532,6 +534,7 @@ void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
const auto button = QtButtonToMouseButton(event->button());
input_subsystem->GetMouse()->ReleaseButton(button);
input_subsystem->GetMouse()->NotifyChanged();
}
void GRenderWindow::ConstrainMouse() {
@@ -564,6 +567,7 @@ void GRenderWindow::wheelEvent(QWheelEvent* event) {
const int x = event->angleDelta().x();
const int y = event->angleDelta().y();
input_subsystem->GetMouse()->MouseWheelChange(x, y);
input_subsystem->GetMouse()->NotifyChanged();
}
void GRenderWindow::TouchBeginEvent(const QTouchEvent* event) {
@@ -710,8 +714,9 @@ bool GRenderWindow::event(QEvent* event) {
void GRenderWindow::focusOutEvent(QFocusEvent* event) {
QWidget::focusOutEvent(event);
input_subsystem->GetKeyboard()->ReleaseAllKeys();
input_subsystem->GetMouse()->ReleaseAllButtons();
input_subsystem->GetTouchScreen()->ReleaseAllTouch();
input_subsystem->GetMouse()->ReleaseAllButtons();
input_subsystem->GetMouse()->NotifyChanged();
}
void GRenderWindow::resizeEvent(QResizeEvent* event) {