Cosmetic change to playlist loader progress display

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@988 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-06-13 21:27:42 +00:00
parent 4f00450f76
commit 3505278aa5

View file

@ -92,7 +92,7 @@ void play_list(char *dir, char *file)
/* if shuffle is wanted, this is where to do that */ /* if shuffle is wanted, this is where to do that */
lcd_puts(0,0,"Playing..."); lcd_puts(0,0,"Complete. ");
lcd_update(); lcd_update();
/* also make the first song get playing */ /* also make the first song get playing */
mpeg_play(playlist_next(0)); mpeg_play(playlist_next(0));
@ -119,6 +119,11 @@ void add_indices_to_playlist( playlist_info_t *playlist )
int i = 0; int i = 0;
int store_index = 0; int store_index = 0;
int count = 0; int count = 0;
#ifdef SIMULATOR
int next_tick = time(NULL);
#else
int next_tick = current_tick + HZ;
#endif
unsigned char *p; unsigned char *p;
unsigned char buf[512]; unsigned char buf[512];
@ -152,8 +157,14 @@ void add_indices_to_playlist( playlist_info_t *playlist )
} }
store_index = 0; store_index = 0;
if ( playlist->amount % 200 == 0 ) { #ifdef SIMULATOR
snprintf(line, sizeof line, "%d", playlist->amount); if ( time(NULL) >= next_tick ) {
next_tick = time(NULL) + 1;
#else
if ( current_tick >= next_tick ) {
next_tick = current_tick + HZ;
#endif
snprintf(line, sizeof line, "%d files", playlist->amount);
lcd_puts(0,1,line); lcd_puts(0,1,line);
lcd_update(); lcd_update();
} }
@ -162,7 +173,7 @@ void add_indices_to_playlist( playlist_info_t *playlist )
i+= count; i+= count;
} }
snprintf(line, sizeof line, "%d", playlist->amount); snprintf(line, sizeof line, "%d files", playlist->amount);
lcd_puts(0,1,line); lcd_puts(0,1,line);
lcd_update(); lcd_update();