mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
[feature] playlist. show search progressbar when iterating playlist entries
Change-Id: Ib38363f7495ca523e7cc401c0d39e060ed1705ad
This commit is contained in:
parent
82cf845625
commit
072228bb70
4 changed files with 24 additions and 13 deletions
12
apps/misc.c
12
apps/misc.c
|
@ -200,7 +200,7 @@ bool warn_on_pl_erase(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool show_search_progress(bool init, int count)
|
||||
bool show_search_progress(bool init, int display_count, int current, int total)
|
||||
{
|
||||
static int last_tick = 0;
|
||||
|
||||
|
@ -214,7 +214,15 @@ bool show_search_progress(bool init, int count)
|
|||
/* Update progress every 1/10 of a second */
|
||||
if (TIME_AFTER(current_tick, last_tick + HZ/10))
|
||||
{
|
||||
splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT));
|
||||
if (total != current)
|
||||
{
|
||||
splash_progress(current, total, str(LANG_PLAYLIST_SEARCH_MSG),
|
||||
display_count, str(LANG_OFF_ABORT));
|
||||
}
|
||||
else
|
||||
splashf(0, str(LANG_PLAYLIST_SEARCH_MSG),
|
||||
display_count, str(LANG_OFF_ABORT));
|
||||
|
||||
if (action_userabort(TIMEOUT_NOBLOCK))
|
||||
return false;
|
||||
last_tick = current_tick;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue