diff options
| author | Narr the Reg <juangerman-13@hotmail.com> | 2023-02-16 13:38:50 -0600 |
|---|---|---|
| committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-02-16 14:22:13 -0600 |
| commit | 8a7dfb2439925c00b9a84915c31a7bafd6fcfb0b (patch) | |
| tree | 38387309d337d39398538f6d6c30e5db242e8d34 /src/yuzu/bootmanager.cpp | |
| parent | 6932c0ed2a0013c839d65944886a2b848fcdf59e (diff) | |
input_common: Split mouse input into individual devices
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index a64e63a399..17acd3933b 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})); |
