diff options
| author | bunnei <bunneidev@gmail.com> | 2021-01-20 22:39:01 -0800 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-20 22:39:01 -0800 | 
| commit | a1335d3d5142f47602e54a51d09ed16d22164271 (patch) | |
| tree | 91e3d396895e1d915cbaef7a7151d119b43a646e /src/yuzu_cmd | |
| parent | ffbde909c86cef97a0c8352dece27a4980dedbc7 (diff) | |
| parent | b483f2d010bf745ab873e8f8bfaca5515e56d39f (diff) | |
Merge pull request #5270 from german77/multiTouch
HID: Add multitouch support
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 12 | 
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() {          sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true));      Settings::values.touchscreen.enabled =          sdl2_config->GetBoolean("ControlsGeneral", "touch_enabled", true); -    Settings::values.touchscreen.device = -        sdl2_config->Get("ControlsGeneral", "touch_device", "engine:emu_window"); -    Settings::values.touchscreen.finger = -        sdl2_config->GetInteger("ControlsGeneral", "touch_finger", 0);      Settings::values.touchscreen.rotation_angle =          sdl2_config->GetInteger("ControlsGeneral", "touch_angle", 0);      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() {  }  void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { -    TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); +    TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0), 0);      input_subsystem->GetMouse()->MouseMove(x, y);  }  void EmuWindow_SDL2::OnMouseButton(u32 button, u8 state, s32 x, s32 y) {      if (button == SDL_BUTTON_LEFT) {          if (state == SDL_PRESSED) { -            TouchPressed((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); +            TouchPressed((unsigned)std::max(x, 0), (unsigned)std::max(y, 0), 0);          } else { -            TouchReleased(); +            TouchReleased(0);          }      } else if (button == SDL_BUTTON_RIGHT) {          if (state == SDL_PRESSED) { @@ -66,16 +66,16 @@ void EmuWindow_SDL2::OnFingerDown(float x, float y) {      // 3DS does      const auto [px, py] = TouchToPixelPos(x, y); -    TouchPressed(px, py); +    TouchPressed(px, py, 0);  }  void EmuWindow_SDL2::OnFingerMotion(float x, float y) {      const auto [px, py] = TouchToPixelPos(x, y); -    TouchMoved(px, py); +    TouchMoved(px, py, 0);  }  void EmuWindow_SDL2::OnFingerUp() { -    TouchReleased(); +    TouchReleased(0);  }  void EmuWindow_SDL2::OnKeyEvent(int key, u8 state) {  | 
