'End of song list' message now displays for 1 second and then exits to file browser.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2551 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-10-09 22:05:41 +00:00
parent 56e5d1a0a1
commit d4b884e7e0
4 changed files with 29 additions and 20 deletions

View file

@ -611,17 +611,17 @@ new:
id: LANG_END_CONFIRM_PLAYER id: LANG_END_CONFIRM_PLAYER
desc: when playlist has finished desc: when playlist has finished
eng: "<Press ON>" eng: ""
new: new:
id: LANG_END_PLAYLIST_RECORDER id: LANG_END_PLAYLIST_RECORDER
desc: when playlist has finished desc: when playlist has finished
eng: "<End of song list>" eng: "End of song list"
new: new:
id: LANG_END_CONFIRM_RECORDER id: LANG_END_CONFIRM_RECORDER
desc: when playlist has finished desc: when playlist has finished
eng: "Press ON" eng: ""
new: new:
id: LANG_SNAKE_SCORE id: LANG_SNAKE_SCORE

View file

@ -616,7 +616,7 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, bool refresh_all)
return true; return true;
} }
void wps_display(struct mp3entry* id3) bool wps_display(struct mp3entry* id3)
{ {
lcd_clear_display(); lcd_clear_display();
@ -624,11 +624,12 @@ void wps_display(struct mp3entry* id3)
{ {
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
lcd_puts(0, 0, str(LANG_END_PLAYLIST_PLAYER)); lcd_puts(0, 0, str(LANG_END_PLAYLIST_PLAYER));
lcd_puts(0, 1, str(LANG_END_CONFIRM_PLAYER));
#else #else
lcd_puts(0, 2, str(LANG_END_PLAYLIST_RECORDER)); lcd_puts(0, 2, str(LANG_END_PLAYLIST_RECORDER));
lcd_puts(5, 4, str(LANG_END_CONFIRM_RECORDER)); lcd_update();
#endif #endif
sleep(HZ);
return true;
} }
else else
{ {
@ -653,6 +654,7 @@ void wps_display(struct mp3entry* id3)
wps_refresh(id3, 0, true); wps_refresh(id3, 0, true);
status_draw(); status_draw();
lcd_update(); lcd_update();
return false;
} }
#if defined(HAVE_LCD_CHARCELLS) && !defined(SIMULATOR) #if defined(HAVE_LCD_CHARCELLS) && !defined(SIMULATOR)

View file

@ -23,7 +23,7 @@
#include "id3.h" #include "id3.h"
bool wps_refresh(struct mp3entry* id3, int ffwd_offset, bool refresh_scroll); bool wps_refresh(struct mp3entry* id3, int ffwd_offset, bool refresh_scroll);
void wps_display(struct mp3entry* id3); bool wps_display(struct mp3entry* id3);
bool wps_load(char* file, bool display); bool wps_load(char* file, bool display);
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS

View file

@ -280,7 +280,6 @@ static int browse_id3(void)
#endif #endif
case BUTTON_PLAY: case BUTTON_PLAY:
lcd_stop_scroll(); lcd_stop_scroll();
wps_display(id3);
exit = true; exit = true;
break; break;
@ -391,7 +390,8 @@ static bool ffwd_rew(int button)
status_set_playmode(STATUS_PLAY); status_set_playmode(STATUS_PLAY);
} }
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS
wps_display(id3); if (wps_display(id3))
return true;
#endif #endif
exit = true; exit = true;
break; break;
@ -409,7 +409,7 @@ static bool ffwd_rew(int button)
return usb; return usb;
} }
static void update(void) static bool update(void)
{ {
bool track_changed = mpeg_has_changed_track(); bool track_changed = mpeg_has_changed_track();
@ -417,13 +417,13 @@ static void update(void)
{ {
lcd_stop_scroll(); lcd_stop_scroll();
id3 = mpeg_current_track(); id3 = mpeg_current_track();
wps_display(id3); if (wps_display(id3))
return true;
wps_refresh(id3,0,true); wps_refresh(id3,0,true);
} }
if (id3) { if (id3)
wps_refresh(id3,0,false); wps_refresh(id3,0,false);
}
status_draw(); status_draw();
@ -442,6 +442,8 @@ static void update(void)
global_settings.resume_offset = -1; global_settings.resume_offset = -1;
settings_save(); settings_save();
} }
return false;
} }
@ -456,7 +458,8 @@ static bool keylock(void)
display_keylock_text(true); display_keylock_text(true);
keys_locked = true; keys_locked = true;
wps_refresh(id3,0,true); wps_refresh(id3,0,true);
wps_display(id3); if (wps_display(id3))
return true;
status_draw(); status_draw();
while (button_get(false)); /* clear button queue */ while (button_get(false)); /* clear button queue */
@ -501,7 +504,8 @@ static bool keylock(void)
display_keylock_text(true); display_keylock_text(true);
while (button_get(false)); /* clear button queue */ while (button_get(false)); /* clear button queue */
wps_refresh(id3,0,true); wps_refresh(id3,0,true);
wps_display(id3); if(wps_display(id3))
return true;
break; break;
} }
} }
@ -595,7 +599,6 @@ static bool menu(void)
lcd_icon(ICON_PARAM, false); lcd_icon(ICON_PARAM, false);
lcd_icon(ICON_AUDIO, true); lcd_icon(ICON_AUDIO, true);
#endif #endif
wps_display(id3);
exit = true; exit = true;
break; break;
@ -610,7 +613,8 @@ static bool menu(void)
lcd_icon(ICON_PARAM, false); lcd_icon(ICON_PARAM, false);
#endif #endif
wps_display(id3); if (wps_display(id3))
return true;
wps_refresh(id3,0,true); wps_refresh(id3,0,true);
return false; return false;
} }
@ -644,7 +648,8 @@ int wps_show(void)
{ {
id3 = mpeg_current_track(); id3 = mpeg_current_track();
if (id3) { if (id3) {
wps_display(id3); if (wps_display(id3))
return 0;
wps_refresh(id3,0,true); wps_refresh(id3,0,true);
} }
restore = true; restore = true;
@ -851,7 +856,8 @@ int wps_show(void)
return SYS_USB_CONNECTED; return SYS_USB_CONNECTED;
case BUTTON_NONE: /* Timeout */ case BUTTON_NONE: /* Timeout */
update(); if (update())
return 0;
break; break;
} }
@ -860,7 +866,8 @@ int wps_show(void)
if (restore) { if (restore) {
restore = false; restore = false;
wps_display(id3); if (wps_display(id3))
return 0;
if (id3) if (id3)
wps_refresh(id3,0,false); wps_refresh(id3,0,false);
} }