summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-10-28 09:11:42 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-10-28 09:11:42 +0000
commit1a2712072b79025b1741b6f576cc9164c06242e7 (patch)
treeecc24b99e82713899ae837b3cf1bb6fa10dcae1c /apps
parentc5e29938c4c7dfcb1b888bbb3440f8688eb1d165 (diff)
downloadrockbox-1a2712072b79025b1741b6f576cc9164c06242e7.tar.gz
rockbox-1a2712072b79025b1741b6f576cc9164c06242e7.zip
Removed some unnecessary LCD updates
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2755 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 2b97ac692f..e775e9795a 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -719,6 +719,7 @@ bool dirbrowse(char *root)
struct entry* file = &dircache[dircursor+dirstart];
bool restore = false;
+ bool need_update = false;
button = button_get_w_tmo(HZ/5);
switch ( button ) {
@@ -961,7 +962,7 @@ bool dirbrowse(char *root)
}
}
}
- lcd_update();
+ need_update = true;
}
break;
@@ -996,7 +997,7 @@ bool dirbrowse(char *root)
put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
}
}
- lcd_update();
+ need_update = true;
}
break;
@@ -1054,6 +1055,10 @@ bool dirbrowse(char *root)
usb_screen();
reload_root = true;
break;
+
+ case BUTTON_NONE:
+ status_draw();
+ break;
}
if ( button )
@@ -1092,6 +1097,8 @@ bool dirbrowse(char *root)
#endif
numentries = showdir(currdir, dirstart);
put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true);
+
+ need_update = true;
}
if ( numentries ) {
@@ -1112,10 +1119,16 @@ bool dirbrowse(char *root)
}
else
lcd_puts_scroll(LINE_X, dircursor, dircache[i].name);
+
+ need_update = true;
}
}
- status_draw();
- lcd_update();
+
+ if(need_update) {
+ lcd_update();
+
+ need_update = false;
+ }
}
return false;