summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-08-08 10:46:10 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-08-08 10:46:10 +0000
commite10fc4c86cddb60c275c2b65dddc787e08fea92f (patch)
treed8710967a6ee65d1d9dcda16338a8d8b90df013e /apps
parent1cbe4c2e057e3226af3e12eaf2ec29a23152cc9e (diff)
downloadrockbox-e10fc4c86cddb60c275c2b65dddc787e08fea92f.tar.gz
rockbox-e10fc4c86cddb60c275c2b65dddc787e08fea92f.zip
Now adjusts if the cursor goes off-screen on status bar changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1609 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/tree.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c
index e09492946b..5d9277e570 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -482,10 +482,6 @@ bool dirbrowse(char *root)
482#ifdef HAVE_LCD_BITMAP 482#ifdef HAVE_LCD_BITMAP
483 if(global_settings.statusbar) { 483 if(global_settings.statusbar) {
484 statusbar_toggle(); 484 statusbar_toggle();
485 if(CURSOR_Y+LINE_Y+dircursor>TREE_MAX_ON_SCREEN) {
486 start++;
487 dircursor--;
488 }
489 restore = true; 485 restore = true;
490 } 486 }
491#endif 487#endif
@@ -520,6 +516,12 @@ bool dirbrowse(char *root)
520 516
521 if ( restore ) { 517 if ( restore ) {
522 /* restore display */ 518 /* restore display */
519 /* We need to adjust if the number of lines on screen have
520 changed because of a status bar change */
521 if(CURSOR_Y+LINE_Y+dircursor>TREE_MAX_ON_SCREEN) {
522 start++;
523 dircursor--;
524 }
523 numentries = showdir(currdir, start); 525 numentries = showdir(currdir, start);
524 put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true); 526 put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true);
525 } 527 }