diff options
Diffstat (limited to 'apps/status.c')
-rw-r--r-- | apps/status.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/status.c b/apps/status.c index af6eaa4e2a..8c4a7ef809 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -54,6 +54,7 @@ struct status_info { | |||
54 | bool shuffle; | 54 | bool shuffle; |
55 | bool keylock; | 55 | bool keylock; |
56 | bool battery_safe; | 56 | bool battery_safe; |
57 | bool redraw_volume; /* true if the volume gauge needs updating */ | ||
57 | }; | 58 | }; |
58 | 59 | ||
59 | void status_init(void) | 60 | void status_init(void) |
@@ -158,7 +159,8 @@ void status_draw(bool force_redraw) | |||
158 | /* only redraw if forced to, or info has changed */ | 159 | /* only redraw if forced to, or info has changed */ |
159 | if (force_redraw || | 160 | if (force_redraw || |
160 | info.inserted || | 161 | info.inserted || |
161 | !info.battery_safe || | 162 | !info.battery_safe || |
163 | info.redraw_volume || | ||
162 | memcmp(&info, &lastinfo, sizeof(struct status_info))) | 164 | memcmp(&info, &lastinfo, sizeof(struct status_info))) |
163 | { | 165 | { |
164 | lcd_clearrect(0,0,LCD_WIDTH,8); | 166 | lcd_clearrect(0,0,LCD_WIDTH,8); |
@@ -213,7 +215,7 @@ void status_draw(bool force_redraw) | |||
213 | if (battery_state) | 215 | if (battery_state) |
214 | statusbar_icon_battery(info.battlevel, plug_state); | 216 | statusbar_icon_battery(info.battlevel, plug_state); |
215 | 217 | ||
216 | statusbar_icon_volume(info.volume); | 218 | info.redraw_volume = statusbar_icon_volume(info.volume); |
217 | statusbar_icon_play_state(current_playmode() + Icon_Play); | 219 | statusbar_icon_play_state(current_playmode() + Icon_Play); |
218 | switch (info.repeat) { | 220 | switch (info.repeat) { |
219 | case REPEAT_ONE: | 221 | case REPEAT_ONE: |