forked from len0rd/rockbox
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
This commit is contained in:
parent
1cbe4c2e05
commit
e10fc4c86c
1 changed files with 6 additions and 4 deletions
10
apps/tree.c
10
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue