summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/Cst816s.cpp2
-rw-r--r--src/touchhandler/TouchHandler.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/drivers/Cst816s.cpp b/src/drivers/Cst816s.cpp
index adb984e0..127fe1ec 100644
--- a/src/drivers/Cst816s.cpp
+++ b/src/drivers/Cst816s.cpp
@@ -81,7 +81,7 @@ Cst816S::TouchInfos Cst816S::GetTouchInfo() {
info.x = x;
info.y = y;
- info.action = action;
+ info.finger = nbTouchPoints;
info.gesture = static_cast<Gestures>(touchData[gestureIndex]);
return info;
diff --git a/src/touchhandler/TouchHandler.cpp b/src/touchhandler/TouchHandler.cpp
index a13d1af3..90b4d6da 100644
--- a/src/touchhandler/TouchHandler.cpp
+++ b/src/touchhandler/TouchHandler.cpp
@@ -39,13 +39,11 @@ void TouchHandler::Work() {
} else {
x = info.x;
y = info.y;
- if (info.action == 0) {
- lvgl.SetNewTapEvent(info.x, info.y, true);
- } else if (info.action == 1) {
+ if (info.finger == 0) {
lvgl.SetNewTapEvent(info.x, info.y, false);
prevGesture = Pinetime::Drivers::Cst816S::Gestures::None;
isCancelled = false;
- } else if (info.action == 2) {
+ } else if (info.finger == 1) {
if (!isCancelled) {
lvgl.SetNewTapEvent(info.x, info.y, true);
}