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)
downloadrockbox-f1bf9e72861b7eec7cc3e48c1c07e2986bef6902.tar.gz
rockbox-f1bf9e72861b7eec7cc3e48c1c07e2986bef6902.zip
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)
278#ifdef HAVE_LCD_BITMAP 278#ifdef HAVE_LCD_BITMAP
279 if ( dircache[i].attr & ATTR_DIRECTORY ) 279 if ( dircache[i].attr & ATTR_DIRECTORY )
280 icon_type = Folder; 280 icon_type = Folder;
281 else { 281 else if ( dircache[i].attr & TREE_ATTR_M3U )
282 if ( dircache[i].attr & TREE_ATTR_M3U ) 282 icon_type = Playlist;
283 icon_type = Playlist; 283 else if ( dircache[i].attr & TREE_ATTR_MP3 )
284 else 284 icon_type = File;
285 icon_type = File; 285 else
286 } 286 icon_type = 0;
287 lcd_bitmap(bitmap_icons_6x8[icon_type], 287
288 4, MARGIN_Y+(i-start)*line_height, 6, 8, true); 288 if (icon_type)
289 lcd_bitmap(bitmap_icons_6x8[icon_type],
290 4, MARGIN_Y+(i-start)*line_height, 6, 8, true);
289#endif 291#endif
290 292
291 293
@@ -526,7 +528,7 @@ bool dirbrowse(char *root)
526 0, seed ); 528 0, seed );
527 start_index = 0; 529 start_index = 0;
528 } 530 }
529 else { 531 else if (dircache[dircursor+start].attr & TREE_ATTR_MP3 ) {
530 if ( global_settings.resume ) 532 if ( global_settings.resume )
531 strncpy(global_settings.resume_file, 533 strncpy(global_settings.resume_file,
532 currdir, MAX_PATH); 534 currdir, MAX_PATH);
@@ -537,6 +539,8 @@ bool dirbrowse(char *root)
537 start_index = play_list(currdir, NULL, 539 start_index = play_list(currdir, NULL,
538 start_index, false, 0, seed); 540 start_index, false, 0, seed);
539 } 541 }
542 else
543 break;
540 544
541 if ( global_settings.resume ) { 545 if ( global_settings.resume ) {
542 /* the resume_index must always be the index in the 546 /* the resume_index must always be the index in the