summaryrefslogtreecommitdiff
path: root/apps/tagtree.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-10-13 00:05:34 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-10-13 00:10:25 -0400
commitf9ea1fc79d6aaff9949a5b11ae011b4e04e0e9d9 (patch)
treeacef9a442d685e930b9d7435c72d634c841dc795 /apps/tagtree.c
parentc607bfac6feb6bb915f3133a5c70ba871f5112ed (diff)
downloadrockbox-f9ea1fc79d6aaff9949a5b11ae011b4e04e0e9d9.tar.gz
rockbox-f9ea1fc79d6aaff9949a5b11ae011b4e04e0e9d9.zip
splash_progress add delay function
I figure this is a better way to allow a delay before showing the progress meter Change-Id: I909902a52619023b0b87635d2eb94ed00cb4bcec
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index d354d7c2a1..39bc0ab37c 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -2063,19 +2063,17 @@ static bool insert_all_playlist(struct tree_context *c, int position, bool queue
2063 } 2063 }
2064 2064
2065 last_tick = current_tick + HZ/2; /* Show splash after 0.5 seconds have passed */ 2065 last_tick = current_tick + HZ/2; /* Show splash after 0.5 seconds have passed */
2066 2066 splash_progress_set_delay(HZ / 2); /* wait 1/2 sec before progress */
2067 n = c->filesindir; 2067 n = c->filesindir;
2068 for (i = 0; i < n; i++) 2068 for (i = 0; i < n; i++)
2069 { 2069 {
2070 if (TIME_AFTER(current_tick, last_tick - 1)) 2070
2071 splash_progress(i, n, "%s (%s)", str(LANG_WAIT), str(LANG_OFF_ABORT));
2072 if (TIME_AFTER(current_tick, last_tick + HZ/4))
2071 { 2073 {
2072 splash_progress(i, n, "%s (%s)", str(LANG_WAIT), str(LANG_OFF_ABORT)); 2074 if (action_userabort(TIMEOUT_NOBLOCK))
2073 if (TIME_AFTER(current_tick, last_tick + HZ/10)) 2075 break;
2074 { 2076 last_tick = current_tick;
2075 if (action_userabort(TIMEOUT_NOBLOCK))
2076 break;
2077 last_tick = current_tick;
2078 }
2079 } 2077 }
2080 2078
2081 if (!tagcache_retrieve(&tcs, tagtree_get_entry(c, i)->extraseek, 2079 if (!tagcache_retrieve(&tcs, tagtree_get_entry(c, i)->extraseek,