1
0
Fork 0
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:
Linus Nielsen Feltzing 2002-08-08 10:46:10 +00:00
parent 1cbe4c2e05
commit e10fc4c86c

View file

@ -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);
}