summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-01-01 15:49:04 +0100
committerWilliam Wilgus <me.theuser@yahoo.com>2022-01-04 18:04:02 -0500
commitd183959676bd269d1f2252517c4dac750c985482 (patch)
tree5a4b0293ac0cdc6f0c3ecc5743800847bf008020
parentdded97be3413efd8d816bf3cffa2aeb9b323216f (diff)
downloadrockbox-d183959676.tar.gz
rockbox-d183959676.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
-rw-r--r--apps/plugins/pictureflow/pictureflow.c15
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)
}
}
+static void draw_album_text(void);
+static void show_track_list_loading(void)
+{
+ int x = (LCD_WIDTH - mylcd_getstringsize(rb->str(LANG_WAIT), NULL, NULL)) / 2;
+ mylcd_set_foreground(G_BRIGHT(255));
+ int char_height = rb->screens[SCREEN_MAIN]->getcharheight();
+ track_list_yh(char_height);
+ mylcd_putsxy(x, pf_tracks.list_y + (pf_tracks.list_h - char_height) / 2,
+ rb->str(LANG_WAIT));
+ draw_album_text();
+ mylcd_update();
+ mylcd_clear_display();
+}
+
/**
Display the list of tracks
*/
@@ -3556,6 +3570,7 @@ static void show_track_list(void)
{
mylcd_clear_display();
if ( center_slide.slide_index != pf_tracks.cur_idx ) {
+ show_track_list_loading();
create_track_index(center_slide.slide_index);
reset_track_list();
}