summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-08-15 14:06:29 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-08-15 14:06:29 +0000
commit599fa9a6279a4e7dda4b6a46bef6bf4958bb0399 (patch)
treea36e63624fad0bcdb926b2ef08dbcb68ba442307 /apps
parentb9fb0e81f1c702495c3dc73c2f59b965fdf9caae (diff)
fix "off-by-one" bug in paginated scrolling with the title
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10589 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/list.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index f48d4d9ee1..0d8b4d1879 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -377,11 +377,11 @@ void gui_list_select_next(struct gui_list * gui_list)
void gui_list_select_previous(struct gui_list * gui_list)
{
+ int nb_lines = gui_list->display->nb_lines;
+ if (gui_list->title)
+ nb_lines--;
if( gui_list->selected_item-gui_list->selected_size < 0 )
{
- int nb_lines = gui_list->display->nb_lines;
- if (gui_list->title)
- nb_lines--;
if(gui_list->limit_scroll)
return;
/* we have aleady reached the top of the list */
@@ -396,7 +396,6 @@ void gui_list_select_previous(struct gui_list * gui_list)
else
{
int item_pos;
- int nb_lines = gui_list->display->nb_lines;
gui_list->selected_item-=gui_list->selected_size;
item_pos = gui_list->selected_item - gui_list->start_item;
if (global_settings.scroll_paginated)