diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-01-27 00:10:47 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-01-27 00:10:47 -0500 |
commit | 00e5c81ecb35cf99a8aae6d1e67a567cd749450f (patch) | |
tree | e4b4e139601aa3b6d38a0ced940688906664392c | |
parent | d6fb80d4ff6651bca20f13270974fd9dc45640b4 (diff) | |
download | rockbox-00e5c81ecb.tar.gz rockbox-00e5c81ecb.zip |
debug_menu database delay redraw
only redraw every 100 entries
Change-Id: Ie0bb54812c1b8341aa4d8303341904d17baa2890
-rw-r--r-- | apps/debug_menu.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index e3274f5f2c..7fc93b315b 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1854,6 +1854,7 @@ static int database_callback(int btn, struct gui_synclist *lists) (void)lists; struct tagcache_stat *stat = tagcache_get_stat(); static bool synced = false; + static int update_entries = 0; simplelist_set_line_count(0); @@ -1888,12 +1889,19 @@ static int database_callback(int btn, struct gui_synclist *lists) if (!btn && stat->curentry) { synced = true; - return ACTION_REDRAW; + if (update_entries <= stat->processed_entries) + { + update_entries = stat->processed_entries + 100; + return ACTION_REDRAW; + } + return ACTION_NONE; } if (btn == ACTION_STD_CANCEL) + { + update_entries = 0; tagcache_screensync_enable(false); - + } return btn; } static bool dbg_tagcache_info(void) |