summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-10-09 12:14:25 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-10-09 12:14:25 +0000
commit8055825312a111b6c41503e72d3b08cecb95aa28 (patch)
treec6a8d6f8cb36cd318ca493f670044673a701a037
parenta9505c52244edcdad32c419527e89b9d106dcb87 (diff)
downloadrockbox-8055825312a111b6c41503e72d3b08cecb95aa28.zip
rockbox-8055825312a111b6c41503e72d3b08cecb95aa28.tar.gz
rockbox-8055825312a111b6c41503e72d3b08cecb95aa28.tar.bz2
rockbox-8055825312a111b6c41503e72d3b08cecb95aa28.tar.xz
fix the shutdown screen on the recorder
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11160 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/screens.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/apps/screens.c b/apps/screens.c
index d9cfc11..b27dae1 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -981,34 +981,31 @@ bool shutdown_screen(void)
{
int button;
bool done = false;
+ long time_entered = current_tick;
lcd_stop_scroll();
gui_syncsplash(0, true, str(LANG_CONFIRM_SHUTDOWN));
- while(!done)
+ while(!done && TIME_BEFORE(current_tick,time_entered+HZ*2))
{
- button = get_action(CONTEXT_STD,HZ*2);
+ button = get_action(CONTEXT_STD,HZ);
switch(button)
{
case ACTION_STD_CANCEL:
sys_poweroff();
break;
+ /* do nothing here, because ACTION_UNKNOWN might be caused
+ * by timeout or button release. In case of timeout the loop
+ * is terminated by TIME_BEFORE */
+ case ACTION_UNKNOWN:
+ break;
+
default:
if(default_event_handler(button) == SYS_USB_CONNECTED)
return true;
-
- /* Return if any other button was pushed, or if there
- was a timeout. We ignore RELEASE events, since we may
- have been called by a button down event, and the user might
- not have released the button yet.
- We also ignore REPEAT events, since we don't want to
- remove the splash when the user holds OFF to shut down. */
- /* Is this still needed? commenting out so it compiles..
- CHECK ME!!
- if(!(button & (BUTTON_REL | BUTTON_REPEAT)))
- */ done = true;
+ done = true;
break;
}
}