info menu: show 'charging' instead of charge percentage while charging,
the percentage is incorrect anyway, and an indication of charging is good. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1681 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5ba6f01bde
commit
77e05c6803
1 changed files with 10 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "playlist.h"
|
||||
#include "settings.h"
|
||||
#include "settings_menu.h"
|
||||
#include "power.h"
|
||||
#include "powermgmt.h"
|
||||
#include "sound_menu.h"
|
||||
|
||||
|
@ -153,13 +154,21 @@ void show_info(void)
|
|||
snprintf(s, sizeof(s), "Buffer: %d.%02d Mb", integer, decimal);
|
||||
lcd_puts(0, 2, s);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
snprintf(s, sizeof(s), "Batt: %d%%%s", battery_level(), battery_level_safe() ? "" : "!");
|
||||
lcd_puts(0, 1, s);
|
||||
#else
|
||||
#ifdef HAVE_CHARGE_CTRL
|
||||
if (charger_enabled)
|
||||
snprintf(s, sizeof(s), "Battery: charging");
|
||||
else
|
||||
snprintf(s, sizeof(s), "Battery: %d%%%s", battery_level(), battery_level_safe() ? "" : " !!");
|
||||
lcd_puts(0, 3, s);
|
||||
#else
|
||||
snprintf(s, sizeof(s), "Battery: %d%%%s", battery_level(), battery_level_safe() ? "" : " !!");
|
||||
lcd_puts(0, 3, s);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
lcd_update();
|
||||
|
|
Loading…
Reference in a new issue