diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-06-18 11:22:48 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-06-18 11:22:48 +0000 |
| commit | 1a17d356f2c5d32fa0735f0dcad739b9745116b4 (patch) | |
| tree | 9d706ad578ad78bd6c8848bc184a726a5155f486 | |
| parent | ac7b23f7aedc3d11da2b2dbc39dda5960be6c924 (diff) | |
| download | rockbox-1a17d356f2c5d32fa0735f0dcad739b9745116b4.zip rockbox-1a17d356f2c5d32fa0735f0dcad739b9745116b4.tar.gz rockbox-1a17d356f2c5d32fa0735f0dcad739b9745116b4.tar.bz2 rockbox-1a17d356f2c5d32fa0735f0dcad739b9745116b4.tar.xz | |
only menu and prev are treated in directories with no entries
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1064 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/tree.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index efddf5f..a8eb01e 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -232,6 +232,7 @@ bool dirbrowse(char *root) { char buf[255]; int i; + int button; memcpy(currdir,root,sizeof(currdir)); numentries = showdir(root, start); @@ -245,7 +246,20 @@ bool dirbrowse(char *root) lcd_update(); while(1) { - switch(button_get(true)) { + button = button_get(true); + if(!numentries) { + switch(button) { + case TREE_MENU: + case TREE_PREV: + /* let it go */ + break; + default: + continue; + } + } + + + switch(button) { case TREE_EXIT: i=strlen(currdir); if (i>1) { |