summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-23 22:33:13 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-23 22:33:13 +0000
commit39dede951be706b00952d463e7797188346253fe (patch)
treefc4764ff140bc8acf460b24708249340ad64c413 /apps
parent226a5649afad9d5e5e7f89e4851f403aea78c597 (diff)
show_info() now displays buffer size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1425 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/main_menu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index 101dfe529a..bb8fb605c6 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -121,15 +121,30 @@ void show_credits(void)
roll_credits();
}
+/* defined in linker script */
+extern unsigned char mp3buf[];
+extern unsigned char mp3end[];
+
void show_info(void)
{
char s[32];
+ int buflen = ((mp3end - mp3buf) * 100) / 0x100000;
+ int integer, decimal;
lcd_clear_display();
lcd_puts(0, 0, "Rockbox info:");
/* TODO: add disk size/usage info, battery charge etc here? */
+
+#ifdef HAVE_RTC
snprintf(s, sizeof(s), "Booted: %d times", global_settings.total_boots);
lcd_puts(0, 2, s);
+#endif
+
+ integer = buflen / 100;
+ decimal = buflen % 100;
+ snprintf(s, sizeof(s), "Buffer: %d.%02d Mb", integer, decimal);
+ lcd_puts(0, 3, s);
+
lcd_update();
button_get(true);