summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-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)
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