diff options
author | Riku Isokoski <riksu9000@gmail.com> | 2021-07-16 11:55:29 +0300 |
---|---|---|
committer | Riku Isokoski <riksu9000@gmail.com> | 2021-07-16 11:55:29 +0300 |
commit | 329482f87308c185e970b141bcbfe9c83b46c4da (patch) | |
tree | d26143a1994f306c675e6f4f317c3ba457f102b3 /src/touchhandler/TouchHandler.cpp | |
parent | baffa1594f9c1a03a95f0cc10955e3cf8bf880ce (diff) |
Fix remaining known issues
Diffstat (limited to 'src/touchhandler/TouchHandler.cpp')
-rw-r--r-- | src/touchhandler/TouchHandler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/touchhandler/TouchHandler.cpp b/src/touchhandler/TouchHandler.cpp index 160b5e14..0d0b8273 100644 --- a/src/touchhandler/TouchHandler.cpp +++ b/src/touchhandler/TouchHandler.cpp @@ -6,8 +6,10 @@ TouchHandler::TouchHandler(Drivers::Cst816S& touchPanel, Components::LittleVgl& } void TouchHandler::CancelTap() { - isCancelled = true; - lvgl.SetNewTouchPoint(-1, -1, true); + if (info.touching) { + isCancelled = true; + lvgl.SetNewTouchPoint(-1, -1, true); + } } Pinetime::Drivers::Cst816S::Gestures TouchHandler::GestureGet() { @@ -28,7 +30,6 @@ void TouchHandler::Process(void* instance) { } void TouchHandler::Work() { - Pinetime::Drivers::Cst816S::TouchInfos info; Pinetime::Drivers::Cst816S::Gestures prevGesture = Pinetime::Drivers::Cst816S::Gestures::None; while (true) { vTaskSuspend(taskHandle); @@ -48,8 +49,6 @@ void TouchHandler::Work() { if (systemTask->IsSleeping()) { systemTask->PushMessage(System::Messages::TouchWakeUp); } else { - x = info.x; - y = info.y; if (info.touching) { if (!isCancelled) { lvgl.SetNewTouchPoint(info.x, info.y, true); |