summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-23 08:06:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-23 08:06:39 +0000
commite6261734a025cd9053004ded80e06d2d9401d2e3 (patch)
tree4ed5a21c88c3a6e44ecee3b78a1a3114a8243b3d /apps
parent57392acd18468a4530a63d379cc7534b2640e6b3 (diff)
downloadrockbox-e6261734a025cd9053004ded80e06d2d9401d2e3.zip
rockbox-e6261734a025cd9053004ded80e06d2d9401d2e3.tar.gz
rockbox-e6261734a025cd9053004ded80e06d2d9401d2e3.tar.bz2
rockbox-e6261734a025cd9053004ded80e06d2d9401d2e3.tar.xz
two fixes at once:
1. If the WPS is popped up but the mpeg thread can't play any song, we must make sure to update the screen to display the "end of playlist" thing. 2. When having reached the "end of playlist" state, pressing LEFT caused a crash (due to a NULL pointer being used). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1942 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/wps.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/wps.c b/apps/wps.c
index 6445b6b..f2e90f3 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -589,6 +589,7 @@ int wps_show(void)
int button;
int ff_rewind_count = 0;
bool ignore_keyup = true;
+ bool restore = false;
old_release_mask = button_set_release(RELEASE_MASK);
@@ -609,11 +610,13 @@ int wps_show(void)
id3 = mpeg_current_track();
draw_screen(id3);
}
+ else if(!id3)
+ {
+ restore = true;
+ }
while ( 1 )
{
- bool restore = false;
-
button = button_get_w_tmo(HZ/5);
/* discard first event if it's a button release */
@@ -814,7 +817,7 @@ int wps_show(void)
else
#endif
{
- if (id3->elapsed < 3*1000)
+ if (!id3 || (id3->elapsed < 3*1000))
mpeg_prev();
else {
mpeg_pause();