summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-09-27 15:50:35 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:19 +0100
commit484623cd613b01a029a8a837ed7e2e5657d27202 (patch)
treea4ab99b1a87bbeee1790a6c0055d732a06cecc11
parentinput_profiles: Implement input profiles (diff)
downloadyuzu-484623cd613b01a029a8a837ed7e2e5657d27202.tar
yuzu-484623cd613b01a029a8a837ed7e2e5657d27202.tar.gz
yuzu-484623cd613b01a029a8a837ed7e2e5657d27202.tar.bz2
yuzu-484623cd613b01a029a8a837ed7e2e5657d27202.tar.lz
yuzu-484623cd613b01a029a8a837ed7e2e5657d27202.tar.xz
yuzu-484623cd613b01a029a8a837ed7e2e5657d27202.tar.zst
yuzu-484623cd613b01a029a8a837ed7e2e5657d27202.zip
-rw-r--r--src/yuzu/bootmanager.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index e38bc7a9a..d62b0efc2 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -382,7 +382,12 @@ void GRenderWindow::keyReleaseEvent(QKeyEvent* event) {
}
void GRenderWindow::mousePressEvent(QMouseEvent* event) {
- // touch input is handled in TouchBeginEvent
+ if (!Settings::values.touchscreen.enabled) {
+ input_subsystem->GetKeyboard()->PressKey(event->button());
+ return;
+ }
+
+ // Touch input is handled in TouchBeginEvent
if (event->source() == Qt::MouseEventSynthesizedBySystem) {
return;
}
@@ -398,7 +403,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
}
void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
- // touch input is handled in TouchUpdateEvent
+ // Touch input is handled in TouchUpdateEvent
if (event->source() == Qt::MouseEventSynthesizedBySystem) {
return;
}
@@ -411,7 +416,12 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
}
void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
- // touch input is handled in TouchEndEvent
+ if (!Settings::values.touchscreen.enabled) {
+ input_subsystem->GetKeyboard()->ReleaseKey(event->button());
+ return;
+ }
+
+ // Touch input is handled in TouchEndEvent
if (event->source() == Qt::MouseEventSynthesizedBySystem) {
return;
}