diff options
author | Jens Arnold <amiconn@rockbox.org> | 2009-03-29 17:58:24 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2009-03-29 17:58:24 +0000 |
commit | ae61b94a3f48cf3f081e0a0baa06b0dbad4989cd (patch) | |
tree | bb344521298f73ee20dd3052f215873c605c5462 | |
parent | efef625b3fa535df9b2469f085cbe1894c5b0202 (diff) | |
download | rockbox-ae61b94a3f48cf3f081e0a0baa06b0dbad4989cd.tar.gz rockbox-ae61b94a3f48cf3f081e0a0baa06b0dbad4989cd.zip |
Fix the resume problems on hwcodec which were uncovered by r20483+r20485. The timing problem was there before; checking for id3 availability as a criterion whether to exit the wps was plain wrong. Now it exits only if playback actually finished.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20568 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/gwps.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index dd219f166f..631c9dec15 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -255,18 +255,11 @@ long gui_wps_show(void) | |||
255 | { | 255 | { |
256 | wps_state.id3 = audio_current_track(); | 256 | wps_state.id3 = audio_current_track(); |
257 | wps_state.nid3 = audio_next_track(); | 257 | wps_state.nid3 = audio_next_track(); |
258 | if (wps_state.id3) { | 258 | restore = true; /* force initial full redraw */ |
259 | FOR_NB_SCREENS(i) | ||
260 | { | ||
261 | if (!gui_wps_display(&gui_wps[i])) | ||
262 | exit = true; | ||
263 | } | ||
264 | } | ||
265 | } | 259 | } |
266 | 260 | ||
267 | while ( 1 ) | 261 | while ( 1 ) |
268 | { | 262 | { |
269 | yield(); | ||
270 | bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false; | 263 | bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false; |
271 | 264 | ||
272 | /* did someone else (i.e power thread) change audio pause mode? */ | 265 | /* did someone else (i.e power thread) change audio pause mode? */ |
@@ -328,10 +321,9 @@ long gui_wps_show(void) | |||
328 | button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5); | 321 | button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5); |
329 | } | 322 | } |
330 | 323 | ||
331 | /* Exit if audio has stopped playing. This can happen if using the | 324 | /* Exit if audio has stopped playing. This happens e.g. at end of |
332 | sleep timer with the charger plugged or if starting a recording | 325 | playlist or if using the sleep timer. */ |
333 | from F1 */ | 326 | if (!(audio_status() & AUDIO_STATUS_PLAY)) |
334 | if (!audio_status()) | ||
335 | exit = true; | 327 | exit = true; |
336 | /* The iPods/X5/M5 use a single button for the A-B mode markers, | 328 | /* The iPods/X5/M5 use a single button for the A-B mode markers, |
337 | defined as ACTION_WPSAB_SINGLE in their config files. */ | 329 | defined as ACTION_WPSAB_SINGLE in their config files. */ |
@@ -684,13 +676,12 @@ long gui_wps_show(void) | |||
684 | { | 676 | { |
685 | FOR_NB_SCREENS(i) | 677 | FOR_NB_SCREENS(i) |
686 | { | 678 | { |
687 | if(!gui_wps_update(&gui_wps[i])) | 679 | gui_wps_update(&gui_wps[i]); |
688 | exit = true; | ||
689 | } | 680 | } |
690 | update_track = false; | 681 | update_track = false; |
691 | } | 682 | } |
692 | 683 | ||
693 | if (restore && | 684 | if (restore && wps_state.id3 && |
694 | ((restoretimer == RESTORE_WPS_INSTANTLY) || | 685 | ((restoretimer == RESTORE_WPS_INSTANTLY) || |
695 | TIME_AFTER(current_tick, restoretimer))) | 686 | TIME_AFTER(current_tick, restoretimer))) |
696 | { | 687 | { |
@@ -699,8 +690,7 @@ long gui_wps_show(void) | |||
699 | FOR_NB_SCREENS(i) | 690 | FOR_NB_SCREENS(i) |
700 | { | 691 | { |
701 | screens[i].stop_scroll(); | 692 | screens[i].stop_scroll(); |
702 | if (!gui_wps_display(&gui_wps[i])) | 693 | gui_wps_display(&gui_wps[i]); |
703 | exit = true; | ||
704 | } | 694 | } |
705 | } | 695 | } |
706 | 696 | ||