diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-08-23 08:06:39 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-23 08:06:39 +0000 |
| commit | e6261734a025cd9053004ded80e06d2d9401d2e3 (patch) | |
| tree | 4ed5a21c88c3a6e44ecee3b78a1a3114a8243b3d /apps | |
| parent | 57392acd18468a4530a63d379cc7534b2640e6b3 (diff) | |
| download | rockbox-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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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(); |