1
0
Fork 0
forked from len0rd/rockbox

Fixed the slow status bar update in bug report #727790.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4868 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-07-13 06:59:11 +00:00
parent ea598c7b66
commit 3dc50b0d74
3 changed files with 19 additions and 6 deletions

View file

@ -54,6 +54,7 @@ struct status_info {
bool shuffle;
bool keylock;
bool battery_safe;
bool redraw_volume; /* true if the volume gauge needs updating */
};
void status_init(void)
@ -158,7 +159,8 @@ void status_draw(bool force_redraw)
/* only redraw if forced to, or info has changed */
if (force_redraw ||
info.inserted ||
!info.battery_safe ||
!info.battery_safe ||
info.redraw_volume ||
memcmp(&info, &lastinfo, sizeof(struct status_info)))
{
lcd_clearrect(0,0,LCD_WIDTH,8);
@ -213,7 +215,7 @@ void status_draw(bool force_redraw)
if (battery_state)
statusbar_icon_battery(info.battlevel, plug_state);
statusbar_icon_volume(info.volume);
info.redraw_volume = statusbar_icon_volume(info.volume);
statusbar_icon_play_state(current_playmode() + Icon_Play);
switch (info.repeat) {
case REPEAT_ONE: