diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-10-28 09:11:42 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-10-28 09:11:42 +0000 |
commit | 1a2712072b79025b1741b6f576cc9164c06242e7 (patch) | |
tree | ecc24b99e82713899ae837b3cf1bb6fa10dcae1c | |
parent | c5e29938c4c7dfcb1b888bbb3440f8688eb1d165 (diff) | |
download | rockbox-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
-rw-r--r-- | apps/tree.c | 21 |
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) | |||
719 | struct entry* file = &dircache[dircursor+dirstart]; | 719 | struct entry* file = &dircache[dircursor+dirstart]; |
720 | 720 | ||
721 | bool restore = false; | 721 | bool restore = false; |
722 | bool need_update = false; | ||
722 | 723 | ||
723 | button = button_get_w_tmo(HZ/5); | 724 | button = button_get_w_tmo(HZ/5); |
724 | switch ( button ) { | 725 | switch ( button ) { |
@@ -961,7 +962,7 @@ bool dirbrowse(char *root) | |||
961 | } | 962 | } |
962 | } | 963 | } |
963 | } | 964 | } |
964 | lcd_update(); | 965 | need_update = true; |
965 | } | 966 | } |
966 | break; | 967 | break; |
967 | 968 | ||
@@ -996,7 +997,7 @@ bool dirbrowse(char *root) | |||
996 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true); | 997 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true); |
997 | } | 998 | } |
998 | } | 999 | } |
999 | lcd_update(); | 1000 | need_update = true; |
1000 | } | 1001 | } |
1001 | break; | 1002 | break; |
1002 | 1003 | ||
@@ -1054,6 +1055,10 @@ bool dirbrowse(char *root) | |||
1054 | usb_screen(); | 1055 | usb_screen(); |
1055 | reload_root = true; | 1056 | reload_root = true; |
1056 | break; | 1057 | break; |
1058 | |||
1059 | case BUTTON_NONE: | ||
1060 | status_draw(); | ||
1061 | break; | ||
1057 | } | 1062 | } |
1058 | 1063 | ||
1059 | if ( button ) | 1064 | if ( button ) |
@@ -1092,6 +1097,8 @@ bool dirbrowse(char *root) | |||
1092 | #endif | 1097 | #endif |
1093 | numentries = showdir(currdir, dirstart); | 1098 | numentries = showdir(currdir, dirstart); |
1094 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true); | 1099 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, true); |
1100 | |||
1101 | need_update = true; | ||
1095 | } | 1102 | } |
1096 | 1103 | ||
1097 | if ( numentries ) { | 1104 | if ( numentries ) { |
@@ -1112,10 +1119,16 @@ bool dirbrowse(char *root) | |||
1112 | } | 1119 | } |
1113 | else | 1120 | else |
1114 | lcd_puts_scroll(LINE_X, dircursor, dircache[i].name); | 1121 | lcd_puts_scroll(LINE_X, dircursor, dircache[i].name); |
1122 | |||
1123 | need_update = true; | ||
1115 | } | 1124 | } |
1116 | } | 1125 | } |
1117 | status_draw(); | 1126 | |
1118 | lcd_update(); | 1127 | if(need_update) { |
1128 | lcd_update(); | ||
1129 | |||
1130 | need_update = false; | ||
1131 | } | ||
1119 | } | 1132 | } |
1120 | 1133 | ||
1121 | return false; | 1134 | return false; |