From 277c39c2fd64c81ca4d2375049cf6bbbf289f9b4 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 1 Mar 2007 23:41:45 +0000 Subject: left exits the browsers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12541 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3