summaryrefslogtreecommitdiff
path: root/apps/status.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-12-03 23:21:13 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-12-03 23:21:13 +0000
commit34a4111adeb00c5bd806c54622c14a2b80d05226 (patch)
treedb37de03632de32dbd6a16b4796a1c3a56a04039 /apps/status.c
parent66d165819a1c8ef44aad4f07cbebf000be11ceab (diff)
downloadrockbox-34a4111adeb00c5bd806c54622c14a2b80d05226.tar.gz
rockbox-34a4111adeb00c5bd806c54622c14a2b80d05226.zip
Battery meter now shows '?' after boot instead of nothing at all.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4103 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/status.c')
-rw-r--r--apps/status.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/status.c b/apps/status.c
index 7e9233a63f..68d6ac74c1 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -40,7 +40,7 @@ static enum playmode current_mode = STATUS_STOP;
40static long switch_tick; 40static long switch_tick;
41static int battery_charge_step = 0; 41static int battery_charge_step = 0;
42static bool plug_state; 42static bool plug_state;
43static bool battery_state; 43static bool battery_state = true;
44 44
45struct status_info { 45struct status_info {
46 int battlevel; 46 int battlevel;
@@ -167,7 +167,8 @@ void status_draw(bool force_redraw)
167 battery_state = true; 167 battery_state = true;
168 else { 168 else {
169 /* blink battery if level is low */ 169 /* blink battery if level is low */
170 if(TIME_AFTER(current_tick, switch_tick)) { 170 if(TIME_AFTER(current_tick, switch_tick) &&
171 (info.battlevel > -1)) {
171 switch_tick = current_tick+HZ; 172 switch_tick = current_tick+HZ;
172 battery_state =! battery_state; 173 battery_state =! battery_state;
173 } 174 }
@@ -175,7 +176,7 @@ void status_draw(bool force_redraw)
175 } 176 }
176 177
177#ifdef HAVE_LCD_BITMAP 178#ifdef HAVE_LCD_BITMAP
178 if (battery_state && (info.battlevel > -1)) 179 if (battery_state)
179 statusbar_icon_battery(info.battlevel, plug_state); 180 statusbar_icon_battery(info.battlevel, plug_state);
180 181
181 statusbar_icon_volume(info.volume); 182 statusbar_icon_volume(info.volume);