summaryrefslogtreecommitdiffstats
path: root/src/yuzu
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/bootmanager.cpp10
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp2
-rw-r--r--src/yuzu/configuration/configure_ringcon.cpp2
-rw-r--r--src/yuzu/main.cpp8
4 files changed, 18 insertions, 4 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index a64e63a39..17acd3933 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -645,7 +645,10 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) {
const auto pos = mapFromGlobal(QCursor::pos());
const auto [touch_x, touch_y] = MapToTouchScreen(pos.x(), pos.y());
const auto button = QtButtonToMouseButton(event->button());
- input_subsystem->GetMouse()->PressButton(pos.x(), pos.y(), touch_x, touch_y, button);
+
+ input_subsystem->GetMouse()->PressMouseButton(button);
+ input_subsystem->GetMouse()->PressButton(pos.x(), pos.y(), button);
+ input_subsystem->GetMouse()->PressTouchButton(touch_x, touch_y, button);
emit MouseActivity();
}
@@ -661,7 +664,10 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) {
const auto [touch_x, touch_y] = MapToTouchScreen(pos.x(), pos.y());
const int center_x = width() / 2;
const int center_y = height() / 2;
- input_subsystem->GetMouse()->MouseMove(pos.x(), pos.y(), touch_x, touch_y, center_x, center_y);
+
+ 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);
if (Settings::values.mouse_panning && !Settings::values.mouse_enabled) {
QCursor::setPos(mapToGlobal(QPoint{center_x, center_y}));
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 723690e71..50b62293e 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -1490,7 +1490,7 @@ void ConfigureInputPlayer::mousePressEvent(QMouseEvent* event) {
}
const auto button = GRenderWindow::QtButtonToMouseButton(event->button());
- input_subsystem->GetMouse()->PressButton(0, 0, 0, 0, button);
+ input_subsystem->GetMouse()->PressButton(0, 0, button);
}
void ConfigureInputPlayer::wheelEvent(QWheelEvent* event) {
diff --git a/src/yuzu/configuration/configure_ringcon.cpp b/src/yuzu/configuration/configure_ringcon.cpp
index 1275f10c8..71afbc423 100644
--- a/src/yuzu/configuration/configure_ringcon.cpp
+++ b/src/yuzu/configuration/configure_ringcon.cpp
@@ -371,7 +371,7 @@ void ConfigureRingController::mousePressEvent(QMouseEvent* event) {
}
const auto button = GRenderWindow::QtButtonToMouseButton(event->button());
- input_subsystem->GetMouse()->PressButton(0, 0, 0, 0, button);
+ input_subsystem->GetMouse()->PressButton(0, 0, button);
}
void ConfigureRingController::keyPressEvent(QKeyEvent* event) {
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index a1c18ff90..a689a32db 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1165,6 +1165,14 @@ void GMainWindow::InitializeHotkeys() {
Settings::values.use_speed_limit.SetValue(!Settings::values.use_speed_limit.GetValue());
});
connect_shortcut(QStringLiteral("Toggle Mouse Panning"), [&] {
+ if (Settings::values.mouse_enabled) {
+ Settings::values.mouse_panning = false;
+ QMessageBox::warning(
+ this, tr("Emulated mouse is enabled"),
+ tr("Real mouse input and mouse panning are incompatible. Please disable the "
+ "emulated mouse in input advanced settings to allow mouse panning."));
+ return;
+ }
Settings::values.mouse_panning = !Settings::values.mouse_panning;
if (Settings::values.mouse_panning) {
render_window->installEventFilter(render_window);