summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/misc.c b/apps/misc.c
index d8caabd397..bd7aa9485b 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -200,7 +200,7 @@ bool warn_on_pl_erase(void)
200 return true; 200 return true;
201} 201}
202 202
203bool show_search_progress(bool init, int count) 203bool show_search_progress(bool init, int display_count, int current, int total)
204{ 204{
205 static int last_tick = 0; 205 static int last_tick = 0;
206 206
@@ -214,7 +214,15 @@ bool show_search_progress(bool init, int count)
214 /* Update progress every 1/10 of a second */ 214 /* Update progress every 1/10 of a second */
215 if (TIME_AFTER(current_tick, last_tick + HZ/10)) 215 if (TIME_AFTER(current_tick, last_tick + HZ/10))
216 { 216 {
217 splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT)); 217 if (total != current)
218 {
219 splash_progress(current, total, str(LANG_PLAYLIST_SEARCH_MSG),
220 display_count, str(LANG_OFF_ABORT));
221 }
222 else
223 splashf(0, str(LANG_PLAYLIST_SEARCH_MSG),
224 display_count, str(LANG_OFF_ABORT));
225
218 if (action_userabort(TIMEOUT_NOBLOCK)) 226 if (action_userabort(TIMEOUT_NOBLOCK))
219 return false; 227 return false;
220 last_tick = current_tick; 228 last_tick = current_tick;