summaryrefslogtreecommitdiffstats
path: root/apps/action.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-07-18 10:25:32 +0200
committerThomas Martitz <kugel@rockbox.org>2012-07-18 10:28:08 +0200
commit15775c8badac65ad9d7477a1706c019703c15b47 (patch)
tree8d8fa88d377d8cbca763cdd0cdfda7094fadf6c1 /apps/action.c
parentdf9bd8730ce8462324f64c49de0ae51584a19d9e (diff)
downloadrockbox-15775c8badac65ad9d7477a1706c019703c15b47.tar.gz
rockbox-15775c8badac65ad9d7477a1706c019703c15b47.tar.bz2
rockbox-15775c8badac65ad9d7477a1706c019703c15b47.zip
fix erroneous button read in yesno screen and missed buttons in action.c.
If two yesno screens directly follow each other the button release of the first one was incorrectly accepted in the second one. The fix exposed another problem in action.c if action_wait_for_release() is called when no button is actually pressed. The next press was silently eaten. Change-Id: Iaa5f246f7ea1fd775606620a989cdaec74a9305e
Diffstat (limited to 'apps/action.c')
-rw-r--r--apps/action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/action.c b/apps/action.c
index 5ebcbf771b..3c130e3e29 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -232,7 +232,13 @@ static int get_action_worker(int context, int timeout,
/* Data from sys events can be pulled with button_get_data
* multimedia button presses don't go through the action system */
if (button == BUTTON_NONE || button & (SYS_EVENT|BUTTON_MULTIMEDIA))
+ {
+ /* no button pressed so no point in waiting for release */
+ if (button == BUTTON_NONE)
+ wait_for_release = false;
return button;
+ }
+
/* the special redraw button should result in a screen refresh */
if (button == BUTTON_REDRAW)
return ACTION_REDRAW;