diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-08 10:46:10 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-08 10:46:10 +0000 |
| commit | e10fc4c86cddb60c275c2b65dddc787e08fea92f (patch) | |
| tree | d8710967a6ee65d1d9dcda16338a8d8b90df013e | |
| parent | 1cbe4c2e057e3226af3e12eaf2ec29a23152cc9e (diff) | |
| download | rockbox-e10fc4c86cddb60c275c2b65dddc787e08fea92f.zip rockbox-e10fc4c86cddb60c275c2b65dddc787e08fea92f.tar.gz rockbox-e10fc4c86cddb60c275c2b65dddc787e08fea92f.tar.bz2 rockbox-e10fc4c86cddb60c275c2b65dddc787e08fea92f.tar.xz | |
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
| -rw-r--r-- | apps/tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c index e094929..5d9277e 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -482,10 +482,6 @@ bool dirbrowse(char *root) #ifdef HAVE_LCD_BITMAP if(global_settings.statusbar) { statusbar_toggle(); - if(CURSOR_Y+LINE_Y+dircursor>TREE_MAX_ON_SCREEN) { - start++; - dircursor--; - } restore = true; } #endif @@ -520,6 +516,12 @@ bool dirbrowse(char *root) if ( restore ) { /* restore display */ + /* We need to adjust if the number of lines on screen have + changed because of a status bar change */ + if(CURSOR_Y+LINE_Y+dircursor>TREE_MAX_ON_SCREEN) { + start++; + dircursor--; + } numentries = showdir(currdir, start); put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true); } |