diff options
| author | 2015-03-09 00:14:59 -0400 | |
|---|---|---|
| committer | 2015-03-10 23:58:07 -0400 | |
| commit | d61b26b79f889603a084e148626bba3c267cf75f (patch) | |
| tree | d793edd22e25a99aa5c13cc2455a5ec2167afee7 /src/citra_qt/bootmanager.cpp | |
| parent | EmuWindow: Made pad/touch functions non-static. (diff) | |
| download | yuzu-d61b26b79f889603a084e148626bba3c267cf75f.tar.gz yuzu-d61b26b79f889603a084e148626bba3c267cf75f.tar.xz yuzu-d61b26b79f889603a084e148626bba3c267cf75f.zip | |
HID: Complete refactor of pad/touch input to fix threading issues.
Diffstat (limited to 'src/citra_qt/bootmanager.cpp')
| -rw-r--r-- | src/citra_qt/bootmanager.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
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() | |||
| 268 | 268 | ||
| 269 | void GRenderWindow::keyPressEvent(QKeyEvent* event) | 269 | void GRenderWindow::keyPressEvent(QKeyEvent* event) |
| 270 | { | 270 | { |
| 271 | EmuWindow::KeyPressed({event->key(), keyboard_id}); | 271 | this->KeyPressed({event->key(), keyboard_id}); |
| 272 | Service::HID::PadUpdateComplete(); | ||
| 273 | } | 272 | } |
| 274 | 273 | ||
| 275 | void GRenderWindow::keyReleaseEvent(QKeyEvent* event) | 274 | void GRenderWindow::keyReleaseEvent(QKeyEvent* event) |
| 276 | { | 275 | { |
| 277 | EmuWindow::KeyReleased({event->key(), keyboard_id}); | 276 | this->KeyReleased({event->key(), keyboard_id}); |
| 278 | Service::HID::PadUpdateComplete(); | ||
| 279 | } | 277 | } |
| 280 | 278 | ||
| 281 | void GRenderWindow::mousePressEvent(QMouseEvent *event) | 279 | void GRenderWindow::mousePressEvent(QMouseEvent *event) |
| 282 | { | 280 | { |
| 283 | if (event->button() == Qt::LeftButton) { | 281 | if (event->button() == Qt::LeftButton) |
| 282 | { | ||
| 284 | auto pos = event->pos(); | 283 | auto pos = event->pos(); |
| 285 | EmuWindow::TouchPressed(GetFramebufferLayout(), static_cast<u16>(pos.x()), | 284 | this->TouchPressed(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); |
| 286 | static_cast<u16>(pos.y())); | ||
| 287 | } | 285 | } |
| 288 | } | 286 | } |
| 289 | 287 | ||
| 290 | void GRenderWindow::mouseMoveEvent(QMouseEvent *event) | 288 | void GRenderWindow::mouseMoveEvent(QMouseEvent *event) |
| 291 | { | 289 | { |
| 292 | auto pos = event->pos(); | 290 | auto pos = event->pos(); |
| 293 | EmuWindow::TouchMoved(GetFramebufferLayout(), static_cast<u16>(pos.x()), | 291 | this->TouchMoved(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); |
| 294 | static_cast<u16>(pos.y())); | ||
| 295 | } | 292 | } |
| 296 | 293 | ||
| 297 | void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) | 294 | void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) |
| 298 | { | 295 | { |
| 299 | if (event->button() == Qt::LeftButton) { | 296 | if (event->button() == Qt::LeftButton) |
| 300 | auto pos = event->pos(); | 297 | this->TouchReleased(); |
| 301 | EmuWindow::TouchReleased(GetFramebufferLayout(), static_cast<u16>(pos.x()), | ||
| 302 | static_cast<u16>(pos.y())); | ||
| 303 | } | ||
| 304 | } | 298 | } |
| 305 | 299 | ||
| 306 | void GRenderWindow::ReloadSetKeymaps() | 300 | void GRenderWindow::ReloadSetKeymaps() |