diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-06-13 21:27:42 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-06-13 21:27:42 +0000 |
commit | 3505278aa5d4766bb84a95ded6c10f7811e33ceb (patch) | |
tree | a0ef2c85905661dfeddbf8f6576ce9fbb70ae6ad | |
parent | 4f00450f7665ea7912050aa172dbf794848819b6 (diff) | |
download | rockbox-3505278aa5d4766bb84a95ded6c10f7811e33ceb.tar.gz rockbox-3505278aa5d4766bb84a95ded6c10f7811e33ceb.zip |
Cosmetic change to playlist loader progress display
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@988 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playlist.c | 19 |
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) | |||
92 | 92 | ||
93 | /* if shuffle is wanted, this is where to do that */ | 93 | /* if shuffle is wanted, this is where to do that */ |
94 | 94 | ||
95 | lcd_puts(0,0,"Playing..."); | 95 | lcd_puts(0,0,"Complete. "); |
96 | lcd_update(); | 96 | lcd_update(); |
97 | /* also make the first song get playing */ | 97 | /* also make the first song get playing */ |
98 | mpeg_play(playlist_next(0)); | 98 | mpeg_play(playlist_next(0)); |
@@ -119,6 +119,11 @@ void add_indices_to_playlist( playlist_info_t *playlist ) | |||
119 | int i = 0; | 119 | int i = 0; |
120 | int store_index = 0; | 120 | int store_index = 0; |
121 | int count = 0; | 121 | int count = 0; |
122 | #ifdef SIMULATOR | ||
123 | int next_tick = time(NULL); | ||
124 | #else | ||
125 | int next_tick = current_tick + HZ; | ||
126 | #endif | ||
122 | 127 | ||
123 | unsigned char *p; | 128 | unsigned char *p; |
124 | unsigned char buf[512]; | 129 | unsigned char buf[512]; |
@@ -152,8 +157,14 @@ void add_indices_to_playlist( playlist_info_t *playlist ) | |||
152 | } | 157 | } |
153 | 158 | ||
154 | store_index = 0; | 159 | store_index = 0; |
155 | if ( playlist->amount % 200 == 0 ) { | 160 | #ifdef SIMULATOR |
156 | snprintf(line, sizeof line, "%d", playlist->amount); | 161 | if ( time(NULL) >= next_tick ) { |
162 | next_tick = time(NULL) + 1; | ||
163 | #else | ||
164 | if ( current_tick >= next_tick ) { | ||
165 | next_tick = current_tick + HZ; | ||
166 | #endif | ||
167 | snprintf(line, sizeof line, "%d files", playlist->amount); | ||
157 | lcd_puts(0,1,line); | 168 | lcd_puts(0,1,line); |
158 | lcd_update(); | 169 | lcd_update(); |
159 | } | 170 | } |
@@ -162,7 +173,7 @@ void add_indices_to_playlist( playlist_info_t *playlist ) | |||
162 | 173 | ||
163 | i+= count; | 174 | i+= count; |
164 | } | 175 | } |
165 | snprintf(line, sizeof line, "%d", playlist->amount); | 176 | snprintf(line, sizeof line, "%d files", playlist->amount); |
166 | lcd_puts(0,1,line); | 177 | lcd_puts(0,1,line); |
167 | lcd_update(); | 178 | lcd_update(); |
168 | 179 | ||