summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-09 22:05:41 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-09 22:05:41 +0000
commitd4b884e7e0568d33e4f1bfad51886f6a87373d53 (patch)
treed7b8071cfea0f41dbea75c4a12cf5bd628105982
parent56e5d1a0a1f87f24635207f70c42b5efc3fe35ab (diff)
downloadrockbox-d4b884e7e0568d33e4f1bfad51886f6a87373d53.tar.gz
rockbox-d4b884e7e0568d33e4f1bfad51886f6a87373d53.tar.bz2
rockbox-d4b884e7e0568d33e4f1bfad51886f6a87373d53.zip
'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
-rw-r--r--apps/lang/english.lang6
-rw-r--r--apps/wps-display.c8
-rw-r--r--apps/wps-display.h2
-rw-r--r--apps/wps.c33
4 files changed, 29 insertions, 20 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 5c7b0a3b86..ca4c89beaa 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -611,17 +611,17 @@ new:
id: LANG_END_CONFIRM_PLAYER
desc: when playlist has finished
-eng: "<Press ON>"
+eng: ""
new:
id: LANG_END_PLAYLIST_RECORDER
desc: when playlist has finished
-eng: "<End of song list>"
+eng: "End of song list"
new:
id: LANG_END_CONFIRM_RECORDER
desc: when playlist has finished
-eng: "Press ON"
+eng: ""
new:
id: LANG_SNAKE_SCORE
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 2972fc0a33..3dda50842f 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -616,7 +616,7 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, bool refresh_all)
return true;
}
-void wps_display(struct mp3entry* id3)
+bool wps_display(struct mp3entry* id3)
{
lcd_clear_display();
@@ -624,11 +624,12 @@ void wps_display(struct mp3entry* id3)
{
#ifdef HAVE_LCD_CHARCELLS
lcd_puts(0, 0, str(LANG_END_PLAYLIST_PLAYER));
- lcd_puts(0, 1, str(LANG_END_CONFIRM_PLAYER));
#else
lcd_puts(0, 2, str(LANG_END_PLAYLIST_RECORDER));
- lcd_puts(5, 4, str(LANG_END_CONFIRM_RECORDER));
+ lcd_update();
#endif
+ sleep(HZ);
+ return true;
}
else
{
@@ -653,6 +654,7 @@ void wps_display(struct mp3entry* id3)
wps_refresh(id3, 0, true);
status_draw();
lcd_update();
+ return false;
}
#if defined(HAVE_LCD_CHARCELLS) && !defined(SIMULATOR)
diff --git a/apps/wps-display.h b/apps/wps-display.h
index 439660e831..970bca1842 100644
--- a/apps/wps-display.h
+++ b/apps/wps-display.h
@@ -23,7 +23,7 @@
#include "id3.h"
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);
#ifdef HAVE_LCD_CHARCELLS
diff --git a/apps/wps.c b/apps/wps.c
index d2e89adff5..e740216d96 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -280,7 +280,6 @@ static int browse_id3(void)
#endif
case BUTTON_PLAY:
lcd_stop_scroll();
- wps_display(id3);
exit = true;
break;
@@ -391,7 +390,8 @@ static bool ffwd_rew(int button)
status_set_playmode(STATUS_PLAY);
}
#ifdef HAVE_LCD_CHARCELLS
- wps_display(id3);
+ if (wps_display(id3))
+ return true;
#endif
exit = true;
break;
@@ -409,7 +409,7 @@ static bool ffwd_rew(int button)
return usb;
}
-static void update(void)
+static bool update(void)
{
bool track_changed = mpeg_has_changed_track();
@@ -417,13 +417,13 @@ static void update(void)
{
lcd_stop_scroll();
id3 = mpeg_current_track();
- wps_display(id3);
+ if (wps_display(id3))
+ return true;
wps_refresh(id3,0,true);
}
- if (id3) {
+ if (id3)
wps_refresh(id3,0,false);
- }
status_draw();
@@ -442,6 +442,8 @@ static void update(void)
global_settings.resume_offset = -1;
settings_save();
}
+
+ return false;
}
@@ -456,7 +458,8 @@ static bool keylock(void)
display_keylock_text(true);
keys_locked = true;
wps_refresh(id3,0,true);
- wps_display(id3);
+ if (wps_display(id3))
+ return true;
status_draw();
while (button_get(false)); /* clear button queue */
@@ -501,7 +504,8 @@ static bool keylock(void)
display_keylock_text(true);
while (button_get(false)); /* clear button queue */
wps_refresh(id3,0,true);
- wps_display(id3);
+ if(wps_display(id3))
+ return true;
break;
}
}
@@ -595,7 +599,6 @@ static bool menu(void)
lcd_icon(ICON_PARAM, false);
lcd_icon(ICON_AUDIO, true);
#endif
- wps_display(id3);
exit = true;
break;
@@ -610,7 +613,8 @@ static bool menu(void)
lcd_icon(ICON_PARAM, false);
#endif
- wps_display(id3);
+ if (wps_display(id3))
+ return true;
wps_refresh(id3,0,true);
return false;
}
@@ -644,7 +648,8 @@ int wps_show(void)
{
id3 = mpeg_current_track();
if (id3) {
- wps_display(id3);
+ if (wps_display(id3))
+ return 0;
wps_refresh(id3,0,true);
}
restore = true;
@@ -851,7 +856,8 @@ int wps_show(void)
return SYS_USB_CONNECTED;
case BUTTON_NONE: /* Timeout */
- update();
+ if (update())
+ return 0;
break;
}
@@ -860,7 +866,8 @@ int wps_show(void)
if (restore) {
restore = false;
- wps_display(id3);
+ if (wps_display(id3))
+ return 0;
if (id3)
wps_refresh(id3,0,false);
}