From 1a2712072b79025b1741b6f576cc9164c06242e7 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 28 Oct 2002 09:11:42 +0000 Subject: Removed some unnecessary LCD updates git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2755 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 21 +++++++++++++++++---- 1 file 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; -- cgit v1.2.3