summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-10-10 01:50:53 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2022-10-10 07:20:07 -0400
commit0374dea33a4f9cd5ab57cc186aaebe8cc37175d1 (patch)
tree4a71b91e789f6d0415cfb01fb81fb1a20adf8e0a /apps
parentf8e968991d0d94e3b1c5c5611c3d69a9c032d7da (diff)
downloadrockbox-0374dea33a4f9cd5ab57cc186aaebe8cc37175d1.tar.gz
rockbox-0374dea33a4f9cd5ab57cc186aaebe8cc37175d1.zip
playlist_resume add delay before progress splash
Change-Id: I2927ddc49c3dbe96746237c8577f26f240182eeb
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 837e9d7f44..e54918f4f7 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2196,24 +2196,26 @@ int playlist_resume(void)
2196 char *str1 = NULL; 2196 char *str1 = NULL;
2197 char *str2 = NULL; 2197 char *str2 = NULL;
2198 char *str3 = NULL; 2198 char *str3 = NULL;
2199 unsigned long last_tick = current_tick; 2199 unsigned long last_tick = current_tick + HZ / 2; /* wait 1/2 sec before progress */
2200 bool useraborted = false; 2200 bool useraborted = false;
2201 2201
2202 for(count=0; count<nread && !exit_loop && !useraborted; count++,p++) 2202 for(count=0; count<nread && !exit_loop && !useraborted; count++,p++)
2203 { 2203 {
2204 /* Show a splash while we are loading. */ 2204 /* Show a splash while we are loading. */
2205 splash_progress((total_read + count), control_file_size, 2205 if (TIME_AFTER(current_tick, last_tick - 1))
2206 "%s (%s)", str(LANG_WAIT), str(LANG_OFF_ABORT));
2207 if (TIME_AFTER(current_tick, last_tick + HZ/4))
2208 { 2206 {
2209 if (action_userabort(TIMEOUT_NOBLOCK)) 2207 splash_progress((total_read + count), control_file_size,
2208 "%s (%s)", str(LANG_WAIT), str(LANG_OFF_ABORT));
2209 if (TIME_AFTER(current_tick, last_tick + HZ/4))
2210 { 2210 {
2211 useraborted = true; 2211 if (action_userabort(TIMEOUT_NOBLOCK))
2212 break; 2212 {
2213 useraborted = true;
2214 break;
2215 }
2216 last_tick = current_tick;
2213 } 2217 }
2214 last_tick = current_tick;
2215 } 2218 }
2216
2217 /* Are we on a new line? */ 2219 /* Are we on a new line? */
2218 if((*p == '\n') || (*p == '\r')) 2220 if((*p == '\n') || (*p == '\r'))
2219 { 2221 {