Changed Info screen battery info when unknown battery level

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4062 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2003-11-21 13:32:53 +00:00
parent d56e22540d
commit dc3c48d795

View file

@ -189,8 +189,11 @@ bool show_info(void)
snprintf(s, sizeof(s), str(LANG_BATTERY_TRICKLE_CHARGE)); snprintf(s, sizeof(s), str(LANG_BATTERY_TRICKLE_CHARGE));
else else
#endif #endif
snprintf(s, sizeof(s), str(LANG_BATTERY_TIME), battery_level(), if (battery_level() >= 0)
battery_time() / 60, battery_time() % 60); snprintf(s, sizeof(s), str(LANG_BATTERY_TIME), battery_level(),
battery_time() / 60, battery_time() % 60);
else
strncpy(s, "(n/a)", sizeof(s));
lcd_puts(0, y++, s); lcd_puts(0, y++, s);
} }