diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2005-11-26 20:22:19 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-11-26 20:22:19 +0000 |
commit | 8f280a30f3f4a0a51cd4964b08286ca29d514eda (patch) | |
tree | 33043ae709b1ede791f321c77e1ebf3daccc46cd /apps | |
parent | 3026f046e3c0b5b3ac05950e6b3102ed49337066 (diff) |
Debug menu entry for the dircache.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8071 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 1364637ab0..14cdd6cec7 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1668,6 +1668,56 @@ static bool dbg_disk_info(void) } #endif /* !HAVE_MMC */ +#ifdef HAVE_DIRCACHE +static bool dbg_dircache_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), "Cache initialized: %s", + dircache_is_enabled() ? "Yes" : "No"); + lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "Cache size: %d B", + dircache_get_cache_size()); + lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "Last size: %d B", + global_settings.dircache_size); + lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "Limit: %d B", DIRCACHE_LIMIT); + lcd_puts(0, line++, buf); + + snprintf(buf, sizeof(buf), "Reserve: %d/%d B", + dircache_get_reserve_used(), DIRCACHE_RESERVE); + 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; +} + +#endif /* HAVE_DIRCACHE */ + #if CONFIG_CPU == SH7034 bool dbg_save_roms(void) { @@ -1804,6 +1854,9 @@ bool debug_menu(void) #else { "View disk info", dbg_disk_info }, #endif +#ifdef HAVE_DIRCACHE + { "View dircache info", dbg_dircache_info }, +#endif #ifdef HAVE_LCD_BITMAP { "View audio thread", dbg_audio_thread }, #ifdef PM_DEBUG |