From 7949dd4daebe7f058839ecc22f653ee38064d97f Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 28 Dec 2011 05:55:05 +0000 Subject: [PATCH] protect the yes/no screen from extra keypresses (which can happen if you display 2 yes/no screens too quickly) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31452 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/yesno.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index e89e45ae95..a2abae33ae 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c @@ -169,6 +169,9 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, screens[i].stop_scroll(); gui_yesno_draw(&(yn[i])); } + /* make sure to eat any extranous keypresses */ + while (get_action(CONTEXT_STD+99, TIMEOUT_NOBLOCK)) + action_wait_for_release(); while (result==-1) { /* Repeat the question every 5secs (more or less) */ -- 2.11.4.GIT