summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd/emu_window
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-02-16 20:38:50 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2023-02-16 21:22:13 +0100
commit17207939e50b64592f93c623219b70d26272df4d (patch)
tree38387309d337d39398538f6d6c30e5db242e8d34 /src/yuzu_cmd/emu_window
parentQt: Fix mouse scalling (diff)
downloadyuzu-17207939e50b64592f93c623219b70d26272df4d.tar
yuzu-17207939e50b64592f93c623219b70d26272df4d.tar.gz
yuzu-17207939e50b64592f93c623219b70d26272df4d.tar.bz2
yuzu-17207939e50b64592f93c623219b70d26272df4d.tar.lz
yuzu-17207939e50b64592f93c623219b70d26272df4d.tar.xz
yuzu-17207939e50b64592f93c623219b70d26272df4d.tar.zst
yuzu-17207939e50b64592f93c623219b70d26272df4d.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index 5450b8c38..5153cdb79 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -62,7 +62,9 @@ void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) {
const auto mouse_button = SDLButtonToMouseButton(button);
if (state == SDL_PRESSED) {
const auto [touch_x, touch_y] = MouseToTouchPos(x, y);
- input_subsystem->GetMouse()->PressButton(x, y, touch_x, touch_y, mouse_button);
+ input_subsystem->GetMouse()->PressButton(x, y, mouse_button);
+ input_subsystem->GetMouse()->PressMouseButton(mouse_button);
+ input_subsystem->GetMouse()->PressTouchButton(touch_x, touch_y, mouse_button);
} else {
input_subsystem->GetMouse()->ReleaseButton(mouse_button);
}
@@ -70,7 +72,9 @@ void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) {
void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) {
const auto [touch_x, touch_y] = MouseToTouchPos(x, y);
- input_subsystem->GetMouse()->MouseMove(x, y, touch_x, touch_y, 0, 0);
+ input_subsystem->GetMouse()->Move(x, y, 0, 0);
+ input_subsystem->GetMouse()->MouseMove(touch_x, touch_y);
+ input_subsystem->GetMouse()->TouchMove(touch_x, touch_y);
}
void EmuWindow_SDL2::OnFingerDown(float x, float y, std::size_t id) {