From 8d67ff068c11724c0d5b8e160f9a05fe79a77341 Mon Sep 17 00:00:00 2001 From: wu58430 Date: Sun, 3 Dec 2023 08:29:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=94=AE=E9=94=81=E5=AE=9A=E6=94=B9?= =?UTF-8?q?=E5=9B=9E=E4=BB=A5=E5=89=8D=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 27 ++++++++++++--------------- app/app.c | 12 ++++-------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 176b679..d2caabd 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -20,19 +20,8 @@ - + - - - - - - - - - - - @@ -294,6 +290,7 @@ - \ No newline at end of file diff --git a/app/app.c b/app/app.c index 2c08ca4..93f9c52 100644 --- a/app/app.c +++ b/app/app.c @@ -1786,15 +1786,11 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) // KEY_MENU has a special treatment here, because we want to pass hold event to ACTION_Handle // but we don't want it to complain when initial press happens // we want to react on realese instead - else if ( // pass side buttons - !(Key == KEY_SIDE1 && !bKeyHeld)) // pass KEY_MENU held + else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && // pass side buttons + !(Key == KEY_MENU && bKeyHeld)) // pass KEY_MENU held { -// if (!(Key == KEY_SIDE1&&bKeyHeld)&&(!bKeyPressed || (Key == KEY_SIDE1 && bKeyPressed)) && // prevent released or held, prevent KEY_MENU pressed -// !(Key == KEY_SIDE1 && !bKeyPressed)) // pass KEY_MENU released -// return; - if (!(Key == KEY_SIDE1) && !(bKeyPressed != 0)) - - // if (Key == KEY_SIDE1 == 0 && !bKeyPressed != 0) // pass KEY_MENU released + if ((!bKeyPressed || bKeyHeld || (Key == KEY_MENU && bKeyPressed)) && // prevent released or held, prevent KEY_MENU pressed + !(Key == KEY_MENU && !bKeyPressed)) // pass KEY_MENU released return; // keypad is locked, tell the user