summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-05-23 03:34:32 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-05-23 18:01:14 +0200
commitc82806f9cb88f390ae3fb048ba7ff2bb138fa3ec (patch)
tree60f52dfd3e59f1424d03ab71a8cb28b9b845d486 /src/core/hle/service/hid
parentMerge pull request #8342 from lat9nq/clang-latest-stdc++ (diff)
downloadyuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.tar
yuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.tar.gz
yuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.tar.bz2
yuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.tar.lz
yuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.tar.xz
yuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.tar.zst
yuzu-c82806f9cb88f390ae3fb048ba7ff2bb138fa3ec.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp
index 108ce5a41..1da8d3eb0 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.cpp
+++ b/src/core/hle/service/hid/controllers/touchscreen.cpp
@@ -44,7 +44,6 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin
for (std::size_t id = 0; id < MAX_FINGERS; id++) {
const auto& current_touch = touch_status[id];
auto& finger = fingers[id];
- finger.position = current_touch.position;
finger.id = current_touch.id;
if (finger.attribute.start_touch) {
@@ -61,13 +60,18 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin
if (!finger.pressed && current_touch.pressed) {
finger.attribute.start_touch.Assign(1);
finger.pressed = true;
+ finger.position = current_touch.position;
continue;
}
if (finger.pressed && !current_touch.pressed) {
finger.attribute.raw = 0;
finger.attribute.end_touch.Assign(1);
+ continue;
}
+
+ // Only update position if touch is not on a special frame
+ finger.position = current_touch.position;
}
std::array<Core::HID::TouchFinger, MAX_FINGERS> active_fingers;