summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2021-07-15 20:18:05 (GMT)
committerRiku Isokoski <riksu9000@gmail.com>2021-07-15 20:18:05 (GMT)
commit0d24d2b81e995d37bb7fb363df21a19b195107b8 (patch)
tree0bd116f32d6dfe3db316dbcbfb5b6d90d0256975
parentfe64176e7b8a0a7a9df733701d08762b60c2511f (diff)
Quick fix
-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 adb984e..127fe1e 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 a13d1af..90b4d6d 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);
}