forked from len0rd/rockbox
show_info() now displays buffer size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1425 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
226a5649af
commit
39dede951b
1 changed files with 15 additions and 0 deletions
|
@ -121,15 +121,30 @@ void show_credits(void)
|
||||||
roll_credits();
|
roll_credits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* defined in linker script */
|
||||||
|
extern unsigned char mp3buf[];
|
||||||
|
extern unsigned char mp3end[];
|
||||||
|
|
||||||
void show_info(void)
|
void show_info(void)
|
||||||
{
|
{
|
||||||
char s[32];
|
char s[32];
|
||||||
|
int buflen = ((mp3end - mp3buf) * 100) / 0x100000;
|
||||||
|
int integer, decimal;
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0, 0, "Rockbox info:");
|
lcd_puts(0, 0, "Rockbox info:");
|
||||||
/* TODO: add disk size/usage info, battery charge etc here? */
|
/* TODO: add disk size/usage info, battery charge etc here? */
|
||||||
|
|
||||||
|
#ifdef HAVE_RTC
|
||||||
snprintf(s, sizeof(s), "Booted: %d times", global_settings.total_boots);
|
snprintf(s, sizeof(s), "Booted: %d times", global_settings.total_boots);
|
||||||
lcd_puts(0, 2, s);
|
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();
|
lcd_update();
|
||||||
|
|
||||||
button_get(true);
|
button_get(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue