summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-03-01 23:41:45 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-03-01 23:41:45 +0000
commit277c39c2fd64c81ca4d2375049cf6bbbf289f9b4 (patch)
tree8709a698f8ed70683c501d5a7570782a81d857d9
parent361a60c9649097709db3974d6bdae83131a55fd2 (diff)
left exits the browsers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12541 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index a8f40f3d07..06b42b7c86 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -566,6 +566,7 @@ int dirbrowse()
bool need_update = true;
bool exit_func = false;
long thumbnail_time = -1; /* for delaying a thumbnail */
+ long last_cancel = 0;
char* currdir = tc.currdir; /* just a shortcut */
#ifdef HAVE_TAGCACHE
@@ -646,8 +647,16 @@ int dirbrowse()
if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) ||
((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/"))))
{
- break; /* do nothing */
+ if (last_cancel && TIME_BEFORE(current_tick, last_cancel+HZ/2))
+ {
+ last_cancel = 0;
+ action_signalscreenchange(); /* eat the cancel presses */
+ break;
+ }
+ else
+ return GO_TO_ROOT;
}
+ last_cancel = current_tick;
#ifdef HAVE_TAGCACHE
if (id3db)