diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-07-20 00:06:31 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-07-20 00:08:39 -0400 |
commit | 072228bb70c71bd05eff848d15c36d7f540972b3 (patch) | |
tree | 636f5c3e695056ad5a8859539bccf2562702535d /apps/misc.c | |
parent | 82cf84562544f901254fc5d42ab5e7dab7b66388 (diff) | |
download | rockbox-072228bb70c71bd05eff848d15c36d7f540972b3.tar.gz rockbox-072228bb70c71bd05eff848d15c36d7f540972b3.zip |
[feature] playlist. show search progressbar when iterating playlist entries
Change-Id: Ib38363f7495ca523e7cc401c0d39e060ed1705ad
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 12 |
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 | ||
203 | bool show_search_progress(bool init, int count) | 203 | bool 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; |