diff options
Diffstat (limited to 'src/citra_qt')
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 27 | ||||
-rw-r--r-- | src/citra_qt/bootmanager.h | 4 |
2 files changed, 27 insertions, 4 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index a040e75c1..b81bd6167 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -268,14 +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) + { + auto pos = event->pos(); + this->TouchPressed(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); + } +} + +void GRenderWindow::mouseMoveEvent(QMouseEvent *event) +{ + auto pos = event->pos(); + this->TouchMoved(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y())); +} + +void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + this->TouchReleased(); } void GRenderWindow::ReloadSetKeymaps() diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h index a55db682a..288da45a1 100644 --- a/src/citra_qt/bootmanager.h +++ b/src/citra_qt/bootmanager.h @@ -121,6 +121,10 @@ public: void keyPressEvent(QKeyEvent* event) override; void keyReleaseEvent(QKeyEvent* event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void ReloadSetKeymaps() override; void OnClientAreaResized(unsigned width, unsigned height); |