Quick fix
This commit is contained in:
parent
fe64176e7b
commit
0d24d2b81e
2 changed files with 3 additions and 5 deletions
|
@ -81,7 +81,7 @@ Cst816S::TouchInfos Cst816S::GetTouchInfo() {
|
||||||
|
|
||||||
info.x = x;
|
info.x = x;
|
||||||
info.y = y;
|
info.y = y;
|
||||||
info.action = action;
|
info.finger = nbTouchPoints;
|
||||||
info.gesture = static_cast<Gestures>(touchData[gestureIndex]);
|
info.gesture = static_cast<Gestures>(touchData[gestureIndex]);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
|
|
@ -39,13 +39,11 @@ void TouchHandler::Work() {
|
||||||
} else {
|
} else {
|
||||||
x = info.x;
|
x = info.x;
|
||||||
y = info.y;
|
y = info.y;
|
||||||
if (info.action == 0) {
|
if (info.finger == 0) {
|
||||||
lvgl.SetNewTapEvent(info.x, info.y, true);
|
|
||||||
} else if (info.action == 1) {
|
|
||||||
lvgl.SetNewTapEvent(info.x, info.y, false);
|
lvgl.SetNewTapEvent(info.x, info.y, false);
|
||||||
prevGesture = Pinetime::Drivers::Cst816S::Gestures::None;
|
prevGesture = Pinetime::Drivers::Cst816S::Gestures::None;
|
||||||
isCancelled = false;
|
isCancelled = false;
|
||||||
} else if (info.action == 2) {
|
} else if (info.finger == 1) {
|
||||||
if (!isCancelled) {
|
if (!isCancelled) {
|
||||||
lvgl.SetNewTapEvent(info.x, info.y, true);
|
lvgl.SetNewTapEvent(info.x, info.y, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue