summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-03-26 11:33:42 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-03-26 11:33:42 +0000
commit7c4e0c8730d5b076d4db4206361bc38d5256a23f (patch)
tree43382ae25de9bfa0bbabdff7d51c32b651ad47b5 /apps/debug_menu.c
parent50d40ea43409745bc828e56af5e3879ea6b48cf1 (diff)
downloadrockbox-7c4e0c8730d5b076d4db4206361bc38d5256a23f.zip
rockbox-7c4e0c8730d5b076d4db4206361bc38d5256a23f.tar.gz
rockbox-7c4e0c8730d5b076d4db4206361bc38d5256a23f.tar.bz2
rockbox-7c4e0c8730d5b076d4db4206361bc38d5256a23f.tar.xz
Initial version of tagcache! There are still some bugs in the engine
and much more problems with the UI. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9256 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 9ab5050..c62f65e 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -49,6 +49,8 @@
#include "screens.h"
#include "misc.h"
#include "splash.h"
+#include "dircache.h"
+#include "tagcache.h"
#include "lcd-remote.h"
#ifdef HAVE_LCD_BITMAP
@@ -1855,6 +1857,10 @@ static bool dbg_dircache_info(void)
dircache_get_build_ticks() / HZ);
lcd_puts(0, line++, buf);
+ snprintf(buf, sizeof(buf), "Entry count: %d",
+ dircache_get_entry_count());
+ lcd_puts(0, line++, buf);
+
lcd_update();
switch (button_get_w_tmo(HZ/2))
@@ -1871,6 +1877,38 @@ static bool dbg_dircache_info(void)
#endif /* HAVE_DIRCACHE */
+static bool dbg_tagcache_info(void)
+{
+ bool done = false;
+ int line;
+ char buf[32];
+
+ lcd_setmargins(0, 0);
+ lcd_setfont(FONT_SYSFIXED);
+
+ while (!done)
+ {
+ line = 0;
+
+ lcd_clear_display();
+ snprintf(buf, sizeof(buf), "Current progress: %d%%",
+ tagcache_get_progress());
+ lcd_puts(0, line++, buf);
+
+ lcd_update();
+
+ switch (button_get_w_tmo(HZ/2))
+ {
+ case SETTINGS_OK:
+ case SETTINGS_CANCEL:
+ done = true;
+ break;
+ }
+ }
+
+ return false;
+}
+
#if CONFIG_CPU == SH7034
bool dbg_save_roms(void)
{
@@ -2014,6 +2052,7 @@ bool debug_menu(void)
#ifdef HAVE_DIRCACHE
{ "View dircache info", dbg_dircache_info },
#endif
+ { "View tagcache info", dbg_tagcache_info },
#ifdef HAVE_LCD_BITMAP
{ "View audio thread", dbg_audio_thread },
#ifdef PM_DEBUG