summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-27 21:29:33 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-27 21:29:33 +0000
commitd21f8b9ba379847f5ccf324fc2ffb1d6e228a2a1 (patch)
tree7f0db9f6da644b7e83fe0eab0b13e77a90c0d51f /apps
parentd07f61014f59bde2c54cd022c20ad8adf4f5378b (diff)
Added battery level to the info screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1473 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/main_menu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index f33eedc3f9..d1219e4e25 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -31,6 +31,7 @@
#include "playlist.h"
#include "settings.h"
#include "settings_menu.h"
+#include "power.h"
#include "sound_menu.h"
#ifdef HAVE_LCD_BITMAP
@@ -148,9 +149,20 @@ void show_info(void)
integer = buflen / 100;
decimal = buflen % 100;
+#ifdef HAVE_LCD_CHARCELLS
+ snprintf(s, sizeof(s), "Buf: %d.%02dM", integer, decimal);
+#else
snprintf(s, sizeof(s), "Buffer: %d.%02d Mb", integer, decimal);
+#endif
lcd_puts(0, 3, s);
+#ifdef HAVE_LCD_CHARCELLS
+ snprintf(s, sizeof(s), "Batt: %d%%", battery_level());
+#else
+ snprintf(s, sizeof(s), "Battery: %d%%", battery_level());
+#endif
+ lcd_puts(0, 4, s);
+
lcd_update();
/* Wait for a key to be pushed */