summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-08-23 22:15:51 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-08-23 22:15:51 +0000
commitf1bf9e72861b7eec7cc3e48c1c07e2986bef6902 (patch)
treee8902d9531add523fed2b6d8f858ec26454074a7
parent10fc53c75f88a114c69cc6abe58eb6af69e1c1fe (diff)
Now doesn't try to play non-mp3/m3u files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1960 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tree.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/tree.c b/apps/tree.c
index d7cb7fbe33..9dae3229e2 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -278,14 +278,16 @@ static int showdir(char *path, int start)
#ifdef HAVE_LCD_BITMAP
if ( dircache[i].attr & ATTR_DIRECTORY )
icon_type = Folder;
- else {
- if ( dircache[i].attr & TREE_ATTR_M3U )
- icon_type = Playlist;
- else
- icon_type = File;
- }
- lcd_bitmap(bitmap_icons_6x8[icon_type],
- 4, MARGIN_Y+(i-start)*line_height, 6, 8, true);
+ else if ( dircache[i].attr & TREE_ATTR_M3U )
+ icon_type = Playlist;
+ else if ( dircache[i].attr & TREE_ATTR_MP3 )
+ icon_type = File;
+ else
+ icon_type = 0;
+
+ if (icon_type)
+ lcd_bitmap(bitmap_icons_6x8[icon_type],
+ 4, MARGIN_Y+(i-start)*line_height, 6, 8, true);
#endif
@@ -526,7 +528,7 @@ bool dirbrowse(char *root)
0, seed );
start_index = 0;
}
- else {
+ else if (dircache[dircursor+start].attr & TREE_ATTR_MP3 ) {
if ( global_settings.resume )
strncpy(global_settings.resume_file,
currdir, MAX_PATH);
@@ -537,6 +539,8 @@ bool dirbrowse(char *root)
start_index = play_list(currdir, NULL,
start_index, false, 0, seed);
}
+ else
+ break;
if ( global_settings.resume ) {
/* the resume_index must always be the index in the