diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-05-30 02:08:35 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-05-30 02:08:35 +0000 |
| commit | 155e3d33d602e5aa440d785fb774ae711fae0e1a (patch) | |
| tree | 3d5ea1e5144c8f8f36bc57cb73d6b2d70d004366 | |
| parent | ebab48b5ccdb1afc921c19dc29faeace9853e0d6 (diff) | |
| download | rockbox-155e3d33d602e5aa440d785fb774ae711fae0e1a.zip rockbox-155e3d33d602e5aa440d785fb774ae711fae0e1a.tar.gz rockbox-155e3d33d602e5aa440d785fb774ae711fae0e1a.tar.bz2 rockbox-155e3d33d602e5aa440d785fb774ae711fae0e1a.tar.xz | |
Fix the last (?) of the selction wierdness, this time when moving at the begining of the list
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13520 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/gui/list.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index c5acfbb..18b49f6 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -178,13 +178,11 @@ static void gui_list_put_selection_in_screen(struct gui_list * gui_list, } else { - int list_start = gui_list->selected_item - SCROLL_LIMIT + 1; - if(list_start + nb_lines > gui_list->nb_items) - list_start = gui_list->nb_items - nb_lines; + int list_start = gui_list->selected_item - SCROLL_LIMIT - 1; gui_list->start_item = list_start; + if(gui_list->start_item < 0) + gui_list->start_item = 0; } - if(gui_list->start_item < 0) - gui_list->start_item = 0; } #ifdef HAVE_LCD_BITMAP |