summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-08-17 08:57:38 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-08-17 08:57:38 +0000
commit30f237303b98a6a0ca72bfc66d12d1e6f07bf506 (patch)
tree375858a7247edea6789b8a9f40f62549a6370872 /apps/tree.c
parentb80266c45617acd5ef8ac5aa51a257222f611f4e (diff)
downloadrockbox-30f237303b98a6a0ca72bfc66d12d1e6f07bf506.zip
rockbox-30f237303b98a6a0ca72bfc66d12d1e6f07bf506.tar.gz
rockbox-30f237303b98a6a0ca72bfc66d12d1e6f07bf506.tar.bz2
rockbox-30f237303b98a6a0ca72bfc66d12d1e6f07bf506.tar.xz
bring back the Battery:Charging splash if you try turning off certain
targets with AC connected git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10628 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 53797ba..0616c0f 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -662,17 +662,19 @@ static bool dirbrowse(void)
}
#endif
}
- break;
- /* ??
#if defined(CONFIG_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING)
- case TREE_OFF | BUTTON_REPEAT:
- if (charger_inserted()) {
- charging_splash();
- restore = true;
+{
+ static int last_off = 0;
+ if (current_tick - last_off < 50) {
+ if (charger_inserted()) {
+ charging_splash();
+ restore = true;
+ }
}
- break;
+ last_off = current_tick;
+}
#endif
- */
+ break; /* case ACTION_TREE_STOP: */
case ACTION_STD_MENU:
/* don't enter menu from plugin browser */
if (*tc.dirfilter < NUM_FILTER_MODES)