From 03c6be69d3ba5ef7070cf857063d2bcfe12d9a3b Mon Sep 17 00:00:00 2001
From: ConfuSomu
Date: Mon, 1 Mar 2021 15:13:17 -0500
Subject: Wait for button press then hide popup

---
 pico-watch.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'pico-watch.cpp')

diff --git a/pico-watch.cpp b/pico-watch.cpp
index ebc3f12..7c59d98 100644
--- a/pico-watch.cpp
+++ b/pico-watch.cpp
@@ -36,7 +36,9 @@ int app_render(int app_id) {
 }
 
 int app_btnpressed(int app_id, uint gpio) {
-    return (*APPS_FUNC_BTNPRESS[app_id])(&app_api, gpio);
+    if (app_api.m_send_button_press_to_app)
+        return (*APPS_FUNC_BTNPRESS[app_id])(&app_api, gpio);
+    return 2;
 }
 
 int app_destroy(int app_id) {
-- 
cgit v1.2.3-54-g00ecf