From d61b26b79f889603a084e148626bba3c267cf75f Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 9 Mar 2015 00:14:59 -0400 Subject: HID: Complete refactor of pad/touch input to fix threading issues. --- src/citra_qt/bootmanager.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index cf07e65cc..b81bd6167 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -268,39 +268,33 @@ QByteArray GRenderWindow::saveGeometry() void GRenderWindow::keyPressEvent(QKeyEvent* event) { - EmuWindow::KeyPressed({event->key(), keyboard_id}); - Service::HID::PadUpdateComplete(); + this->KeyPressed({event->key(), keyboard_id}); } void GRenderWindow::keyReleaseEvent(QKeyEvent* event) { - EmuWindow::KeyReleased({event->key(), keyboard_id}); - Service::HID::PadUpdateComplete(); + this->KeyReleased({event->key(), keyboard_id}); } void GRenderWindow::mousePressEvent(QMouseEvent *event) { - if (event->button() == Qt::LeftButton) { + if (event->button() == Qt::LeftButton) + { auto pos = event->pos(); - EmuWindow::TouchPressed(GetFramebufferLayout(), static_cast(pos.x()), - static_cast(pos.y())); + this->TouchPressed(static_cast(pos.x()), static_cast(pos.y())); } } void GRenderWindow::mouseMoveEvent(QMouseEvent *event) { auto pos = event->pos(); - EmuWindow::TouchMoved(GetFramebufferLayout(), static_cast(pos.x()), - static_cast(pos.y())); + this->TouchMoved(static_cast(pos.x()), static_cast(pos.y())); } void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) { - if (event->button() == Qt::LeftButton) { - auto pos = event->pos(); - EmuWindow::TouchReleased(GetFramebufferLayout(), static_cast(pos.x()), - static_cast(pos.y())); - } + if (event->button() == Qt::LeftButton) + this->TouchReleased(); } void GRenderWindow::ReloadSetKeymaps() -- cgit v1.2.3