diff options
author | Riku Isokoski <riksu9000@gmail.com> | 2021-08-11 18:31:40 +0300 |
---|---|---|
committer | Riku Isokoski <riksu9000@gmail.com> | 2021-08-11 18:31:40 +0300 |
commit | fe33c756b7326cbf0a6c70822b70cff4dc2e3401 (patch) | |
tree | 1b4d6a78401db9deae3573904727586f314e84a8 /src | |
parent | cd7ca458fa959ba6d60b2cf107b198e462315abd (diff) |
Fix longpress gesture
Diffstat (limited to 'src')
-rw-r--r-- | src/touchhandler/TouchHandler.cpp | 9 | ||||
-rw-r--r-- | src/touchhandler/TouchHandler.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/touchhandler/TouchHandler.cpp b/src/touchhandler/TouchHandler.cpp index c1a3c0d0..735b311a 100644 --- a/src/touchhandler/TouchHandler.cpp +++ b/src/touchhandler/TouchHandler.cpp @@ -26,14 +26,15 @@ bool TouchHandler::GetNewTouchInfo() { } if (info.gesture != Pinetime::Drivers::Cst816S::Gestures::None) { - if (slideReleased) { + if (gestureReleased) { if (info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideDown || info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideLeft || info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideUp || - info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideRight) { + info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideRight || + info.gesture == Pinetime::Drivers::Cst816S::Gestures::LongPress) { if (info.touching) { gesture = info.gesture; - slideReleased = false; + gestureReleased = false; } } else { gesture = info.gesture; @@ -42,7 +43,7 @@ bool TouchHandler::GetNewTouchInfo() { } if (!info.touching) { - slideReleased = true; + gestureReleased = true; } return true; diff --git a/src/touchhandler/TouchHandler.h b/src/touchhandler/TouchHandler.h index e2140cae..f5442939 100644 --- a/src/touchhandler/TouchHandler.h +++ b/src/touchhandler/TouchHandler.h @@ -39,7 +39,7 @@ namespace Pinetime { Pinetime::Components::LittleVgl& lvgl; Pinetime::Drivers::Cst816S::Gestures gesture; bool isCancelled = false; - bool slideReleased = true; + bool gestureReleased = true; }; } } |