summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp4
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp12
2 files changed, 6 insertions, 10 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 41ef6f6b8..f76102459 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -296,10 +296,6 @@ void Config::ReadValues() {
296 sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true)); 296 sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true));
297 Settings::values.touchscreen.enabled = 297 Settings::values.touchscreen.enabled =
298 sdl2_config->GetBoolean("ControlsGeneral", "touch_enabled", true); 298 sdl2_config->GetBoolean("ControlsGeneral", "touch_enabled", true);
299 Settings::values.touchscreen.device =
300 sdl2_config->Get("ControlsGeneral", "touch_device", "engine:emu_window");
301 Settings::values.touchscreen.finger =
302 sdl2_config->GetInteger("ControlsGeneral", "touch_finger", 0);
303 Settings::values.touchscreen.rotation_angle = 299 Settings::values.touchscreen.rotation_angle =
304 sdl2_config->GetInteger("ControlsGeneral", "touch_angle", 0); 300 sdl2_config->GetInteger("ControlsGeneral", "touch_angle", 0);
305 Settings::values.touchscreen.diameter_x = 301 Settings::values.touchscreen.diameter_x =
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index e32bed5e6..7843d5167 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -29,16 +29,16 @@ EmuWindow_SDL2::~EmuWindow_SDL2() {
29} 29}
30 30
31void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { 31void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) {
32 TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); 32 TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0), 0);
33 input_subsystem->GetMouse()->MouseMove(x, y); 33 input_subsystem->GetMouse()->MouseMove(x, y);
34} 34}
35 35
36void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) { 36void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) {
37 if (button == SDL_BUTTON_LEFT) { 37 if (button == SDL_BUTTON_LEFT) {
38 if (state == SDL_PRESSED) { 38 if (state == SDL_PRESSED) {
39 TouchPressed((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); 39 TouchPressed((unsigned)std::max(x, 0), (unsigned)std::max(y, 0), 0);
40 } else { 40 } else {
41 TouchReleased(); 41 TouchReleased(0);
42 } 42 }
43 } else if (button == SDL_BUTTON_RIGHT) { 43 } else if (button == SDL_BUTTON_RIGHT) {
44 if (state == SDL_PRESSED) { 44 if (state == SDL_PRESSED) {
@@ -66,16 +66,16 @@ void EmuWindow_SDL2::OnFingerDown(float x, float y) {
66 // 3DS does 66 // 3DS does
67 67
68 const auto [px, py] = TouchToPixelPos(x, y); 68 const auto [px, py] = TouchToPixelPos(x, y);
69 TouchPressed(px, py); 69 TouchPressed(px, py, 0);
70} 70}
71 71
72void EmuWindow_SDL2::OnFingerMotion(float x, float y) { 72void EmuWindow_SDL2::OnFingerMotion(float x, float y) {
73 const auto [px, py] = TouchToPixelPos(x, y); 73 const auto [px, py] = TouchToPixelPos(x, y);
74 TouchMoved(px, py); 74 TouchMoved(px, py, 0);
75} 75}
76 76
77void EmuWindow_SDL2::OnFingerUp() { 77void EmuWindow_SDL2::OnFingerUp() {
78 TouchReleased(); 78 TouchReleased(0);
79} 79}
80 80
81void EmuWindow_SDL2::OnKeyEvent(int key, u8 state) { 81void EmuWindow_SDL2::OnKeyEvent(int key, u8 state) {