summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-06-13 21:27:42 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-06-13 21:27:42 +0000
commit3505278aa5d4766bb84a95ded6c10f7811e33ceb (patch)
treea0ef2c85905661dfeddbf8f6576ce9fbb70ae6ad /apps/playlist.c
parent4f00450f7665ea7912050aa172dbf794848819b6 (diff)
Cosmetic change to playlist loader progress display
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@988 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 5a6ccb0532..e46a7faa9e 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -92,7 +92,7 @@ void play_list(char *dir, char *file)
/* if shuffle is wanted, this is where to do that */
- lcd_puts(0,0,"Playing...");
+ lcd_puts(0,0,"Complete. ");
lcd_update();
/* also make the first song get playing */
mpeg_play(playlist_next(0));
@@ -119,6 +119,11 @@ void add_indices_to_playlist( playlist_info_t *playlist )
int i = 0;
int store_index = 0;
int count = 0;
+#ifdef SIMULATOR
+ int next_tick = time(NULL);
+#else
+ int next_tick = current_tick + HZ;
+#endif
unsigned char *p;
unsigned char buf[512];
@@ -152,8 +157,14 @@ void add_indices_to_playlist( playlist_info_t *playlist )
}
store_index = 0;
- if ( playlist->amount % 200 == 0 ) {
- snprintf(line, sizeof line, "%d", playlist->amount);
+#ifdef SIMULATOR
+ 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_update();
}
@@ -162,7 +173,7 @@ void add_indices_to_playlist( playlist_info_t *playlist )
i+= count;
}
- snprintf(line, sizeof line, "%d", playlist->amount);
+ snprintf(line, sizeof line, "%d files", playlist->amount);
lcd_puts(0,1,line);
lcd_update();