diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 9ab505061e..c62f65e33d 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -49,6 +49,8 @@ | |||
49 | #include "screens.h" | 49 | #include "screens.h" |
50 | #include "misc.h" | 50 | #include "misc.h" |
51 | #include "splash.h" | 51 | #include "splash.h" |
52 | #include "dircache.h" | ||
53 | #include "tagcache.h" | ||
52 | #include "lcd-remote.h" | 54 | #include "lcd-remote.h" |
53 | 55 | ||
54 | #ifdef HAVE_LCD_BITMAP | 56 | #ifdef HAVE_LCD_BITMAP |
@@ -1855,6 +1857,10 @@ static bool dbg_dircache_info(void) | |||
1855 | dircache_get_build_ticks() / HZ); | 1857 | dircache_get_build_ticks() / HZ); |
1856 | lcd_puts(0, line++, buf); | 1858 | lcd_puts(0, line++, buf); |
1857 | 1859 | ||
1860 | snprintf(buf, sizeof(buf), "Entry count: %d", | ||
1861 | dircache_get_entry_count()); | ||
1862 | lcd_puts(0, line++, buf); | ||
1863 | |||
1858 | lcd_update(); | 1864 | lcd_update(); |
1859 | 1865 | ||
1860 | switch (button_get_w_tmo(HZ/2)) | 1866 | switch (button_get_w_tmo(HZ/2)) |
@@ -1871,6 +1877,38 @@ static bool dbg_dircache_info(void) | |||
1871 | 1877 | ||
1872 | #endif /* HAVE_DIRCACHE */ | 1878 | #endif /* HAVE_DIRCACHE */ |
1873 | 1879 | ||
1880 | static bool dbg_tagcache_info(void) | ||
1881 | { | ||
1882 | bool done = false; | ||
1883 | int line; | ||
1884 | char buf[32]; | ||
1885 | |||
1886 | lcd_setmargins(0, 0); | ||
1887 | lcd_setfont(FONT_SYSFIXED); | ||
1888 | |||
1889 | while (!done) | ||
1890 | { | ||
1891 | line = 0; | ||
1892 | |||
1893 | lcd_clear_display(); | ||
1894 | snprintf(buf, sizeof(buf), "Current progress: %d%%", | ||
1895 | tagcache_get_progress()); | ||
1896 | lcd_puts(0, line++, buf); | ||
1897 | |||
1898 | lcd_update(); | ||
1899 | |||
1900 | switch (button_get_w_tmo(HZ/2)) | ||
1901 | { | ||
1902 | case SETTINGS_OK: | ||
1903 | case SETTINGS_CANCEL: | ||
1904 | done = true; | ||
1905 | break; | ||
1906 | } | ||
1907 | } | ||
1908 | |||
1909 | return false; | ||
1910 | } | ||
1911 | |||
1874 | #if CONFIG_CPU == SH7034 | 1912 | #if CONFIG_CPU == SH7034 |
1875 | bool dbg_save_roms(void) | 1913 | bool dbg_save_roms(void) |
1876 | { | 1914 | { |
@@ -2014,6 +2052,7 @@ bool debug_menu(void) | |||
2014 | #ifdef HAVE_DIRCACHE | 2052 | #ifdef HAVE_DIRCACHE |
2015 | { "View dircache info", dbg_dircache_info }, | 2053 | { "View dircache info", dbg_dircache_info }, |
2016 | #endif | 2054 | #endif |
2055 | { "View tagcache info", dbg_tagcache_info }, | ||
2017 | #ifdef HAVE_LCD_BITMAP | 2056 | #ifdef HAVE_LCD_BITMAP |
2018 | { "View audio thread", dbg_audio_thread }, | 2057 | { "View audio thread", dbg_audio_thread }, |
2019 | #ifdef PM_DEBUG | 2058 | #ifdef PM_DEBUG |