summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 9bd42941bc..27665981f7 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -30,12 +30,10 @@
30#include "settings.h" 30#include "settings.h"
31#include "status.h" 31#include "status.h"
32#include "applimits.h" 32#include "applimits.h"
33
34#ifdef HAVE_LCD_BITMAP 33#ifdef HAVE_LCD_BITMAP
35#define LINE_Y (global_settings.statusbar&&statusbar_enabled?1:0) /* Y position the entry-list starts at */ 34#include "icons.h"
36#else /* HAVE_LCD_BITMAP */ 35#include "widgets.h"
37#define LINE_Y 0 /* Y position the entry-list starts at */ 36#endif
38#endif /* HAVE_LCD_BITMAP */
39 37
40playlist_info_t playlist; 38playlist_info_t playlist;
41 39
@@ -183,10 +181,17 @@ void play_list(char *dir, /* "current directory" */
183 181
184 playlist.index = start_index; 182 playlist.index = start_index;
185 183
184#ifdef HAVE_LCD_BITMAP
185 if(global_settings.statusbar)
186 lcd_setmargins(0, STATUSBAR_HEIGHT);
187 else
188 lcd_setmargins(0, 0);
189#endif
190
186 /* If file is NULL, the list is in RAM */ 191 /* If file is NULL, the list is in RAM */
187 if(file) { 192 if(file) {
188 lcd_clear_display(); 193 lcd_clear_display();
189 lcd_puts(0,LINE_Y,"Loading..."); 194 lcd_puts(0,0,"Loading...");
190 status_draw(); 195 status_draw();
191 lcd_update(); 196 lcd_update();
192 playlist.in_ram = false; 197 playlist.in_ram = false;
@@ -216,7 +221,7 @@ void play_list(char *dir, /* "current directory" */
216 221
217 if(global_settings.playlist_shuffle) { 222 if(global_settings.playlist_shuffle) {
218 if(!playlist.in_ram) { 223 if(!playlist.in_ram) {
219 lcd_puts(0,LINE_Y,"Shuffling..."); 224 lcd_puts(0,0,"Shuffling...");
220 status_draw(); 225 status_draw();
221 lcd_update(); 226 lcd_update();
222 randomise_playlist( random_seed ); 227 randomise_playlist( random_seed );
@@ -247,7 +252,7 @@ void play_list(char *dir, /* "current directory" */
247 } 252 }
248 253
249 if(!playlist.in_ram) { 254 if(!playlist.in_ram) {
250 lcd_puts(0,LINE_Y,"Playing... "); 255 lcd_puts(0,0,"Playing... ");
251 status_draw(); 256 status_draw();
252 lcd_update(); 257 lcd_update();
253 } 258 }
@@ -342,7 +347,7 @@ void add_indices_to_playlist(void)
342 next_tick = current_tick + HZ; 347 next_tick = current_tick + HZ;
343 snprintf(line, sizeof line, "%d files", 348 snprintf(line, sizeof line, "%d files",
344 playlist.amount); 349 playlist.amount);
345 lcd_puts(0,LINE_Y+1,line); 350 lcd_puts(0,1,line);
346 status_draw(); 351 status_draw();
347 lcd_update(); 352 lcd_update();
348 } 353 }
@@ -357,7 +362,7 @@ void add_indices_to_playlist(void)
357 } 362 }
358 if(!playlist.in_ram) { 363 if(!playlist.in_ram) {
359 snprintf(line, sizeof line, "%d files", playlist.amount); 364 snprintf(line, sizeof line, "%d files", playlist.amount);
360 lcd_puts(0,LINE_Y+1,line); 365 lcd_puts(0,1,line);
361 status_draw(); 366 status_draw();
362 lcd_update(); 367 lcd_update();
363 close(fd); 368 close(fd);