diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-01-01 15:49:04 +0100 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-01-04 18:04:02 -0500 |
commit | d183959676bd269d1f2252517c4dac750c985482 (patch) | |
tree | 5a4b0293ac0cdc6f0c3ecc5743800847bf008020 /apps/plugins/pictureflow | |
parent | dded97be3413efd8d816bf3cffa2aeb9b323216f (diff) | |
download | rockbox-d183959676bd269d1f2252517c4dac750c985482.tar.gz rockbox-d183959676bd269d1f2252517c4dac750c985482.zip |
PictureFlow: Show track list loading message
When tagcache or storage are busy, it can
take a few seconds for the list to appear.
Meanwhile, the screen used to be either blank
or the cover was left suspended in mid-animation,
if the animation was skipped.
Change-Id: I655320c4f92ff496834e252cc77ece47723a8677
Diffstat (limited to 'apps/plugins/pictureflow')
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 7801377bda..74146d8172 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -3549,6 +3549,20 @@ void reset_track_list(void) | |||
3549 | } | 3549 | } |
3550 | } | 3550 | } |
3551 | 3551 | ||
3552 | static void draw_album_text(void); | ||
3553 | static void show_track_list_loading(void) | ||
3554 | { | ||
3555 | int x = (LCD_WIDTH - mylcd_getstringsize(rb->str(LANG_WAIT), NULL, NULL)) / 2; | ||
3556 | mylcd_set_foreground(G_BRIGHT(255)); | ||
3557 | int char_height = rb->screens[SCREEN_MAIN]->getcharheight(); | ||
3558 | track_list_yh(char_height); | ||
3559 | mylcd_putsxy(x, pf_tracks.list_y + (pf_tracks.list_h - char_height) / 2, | ||
3560 | rb->str(LANG_WAIT)); | ||
3561 | draw_album_text(); | ||
3562 | mylcd_update(); | ||
3563 | mylcd_clear_display(); | ||
3564 | } | ||
3565 | |||
3552 | /** | 3566 | /** |
3553 | Display the list of tracks | 3567 | Display the list of tracks |
3554 | */ | 3568 | */ |
@@ -3556,6 +3570,7 @@ static void show_track_list(void) | |||
3556 | { | 3570 | { |
3557 | mylcd_clear_display(); | 3571 | mylcd_clear_display(); |
3558 | if ( center_slide.slide_index != pf_tracks.cur_idx ) { | 3572 | if ( center_slide.slide_index != pf_tracks.cur_idx ) { |
3573 | show_track_list_loading(); | ||
3559 | create_track_index(center_slide.slide_index); | 3574 | create_track_index(center_slide.slide_index); |
3560 | reset_track_list(); | 3575 | reset_track_list(); |
3561 | } | 3576 | } |