make use of the splash screen, kill displays we don't need anymore

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3480 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Hak 2003-03-18 23:11:12 +00:00
parent 202169ed5a
commit f6ee2f645e

View file

@ -30,6 +30,7 @@
#include "settings.h" #include "settings.h"
#include "status.h" #include "status.h"
#include "applimits.h" #include "applimits.h"
#include "screens.h"
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
#include "icons.h" #include "icons.h"
#include "widgets.h" #include "widgets.h"
@ -545,10 +546,7 @@ int play_list(char *dir, /* "current directory" */
/* If file is NULL, the list is in RAM */ /* If file is NULL, the list is in RAM */
if(file) { if(file) {
lcd_clear_display(); splash(0, 0, true, str(LANG_PLAYLIST_LOAD));
lcd_puts(0,0,str(LANG_PLAYLIST_LOAD));
status_draw();
lcd_update();
playlist.in_ram = false; playlist.in_ram = false;
} else { } else {
/* Assign a dummy filename */ /* Assign a dummy filename */
@ -576,9 +574,7 @@ int play_list(char *dir, /* "current directory" */
if(global_settings.playlist_shuffle) { if(global_settings.playlist_shuffle) {
if(!playlist.in_ram) { if(!playlist.in_ram) {
lcd_puts(0,0,str(LANG_PLAYLIST_SHUFFLE)); splash(0, 0, true, str(LANG_PLAYLIST_SHUFFLE));
status_draw();
lcd_update();
randomise_playlist( random_seed ); randomise_playlist( random_seed );
} }
else { else {
@ -623,11 +619,6 @@ int play_list(char *dir, /* "current directory" */
} }
} }
if(!playlist.in_ram) {
lcd_puts(0,0,str(LANG_PLAYLIST_PLAY));
status_draw();
lcd_update();
}
/* also make the first song get playing */ /* also make the first song get playing */
mpeg_play(start_offset); mpeg_play(start_offset);
@ -643,12 +634,10 @@ void add_indices_to_playlist(void)
int fd = -1; int fd = -1;
int i = 0; int i = 0;
int count = 0; int count = 0;
int next_tick = current_tick + HZ;
unsigned char* buffer = playlist_buffer; unsigned char* buffer = playlist_buffer;
int buflen = PLAYLIST_BUFFER_SIZE; int buflen = PLAYLIST_BUFFER_SIZE;
bool store_index; bool store_index;
unsigned char *p; unsigned char *p;
char line[16];
if(!playlist.in_ram) { if(!playlist.in_ram) {
fd = open(playlist.filename, O_RDONLY); fd = open(playlist.filename, O_RDONLY);
@ -708,19 +697,6 @@ void add_indices_to_playlist(void)
return; return;
} }
/* Update the screen if it takes very long */
if(!playlist.in_ram) {
if ( current_tick >= next_tick ) {
next_tick = current_tick + HZ;
snprintf(line, sizeof line,
str(LANG_PLAYINDICES_AMOUNT),
playlist.amount);
lcd_puts(0,1,line);
status_draw();
lcd_update();
}
}
} }
} }
} }
@ -730,14 +706,9 @@ void add_indices_to_playlist(void)
if(playlist.in_ram) if(playlist.in_ram)
break; break;
} }
if(!playlist.in_ram) {
snprintf(line, sizeof line, str(LANG_PLAYINDICES_AMOUNT), if(!playlist.in_ram)
playlist.amount);
lcd_puts(0,1,line);
status_draw();
lcd_update();
close(fd); close(fd);
}
} }
/* /*