summaryrefslogtreecommitdiff
path: root/apps/gui/list.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-07-05 12:31:04 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-07-05 12:31:04 +0000
commit311d048f6f265f8a2d5dcd4050c0da32bfa05f68 (patch)
tree76324f83fd5d07d8dde7ca2e3106e6d10d64375c /apps/gui/list.c
parent2a75a9045c478fc55dad013d74de8c2f144d3046 (diff)
downloadrockbox-311d048f6f265f8a2d5dcd4050c0da32bfa05f68.zip
rockbox-311d048f6f265f8a2d5dcd4050c0da32bfa05f68.tar.gz
rockbox-311d048f6f265f8a2d5dcd4050c0da32bfa05f68.tar.bz2
rockbox-311d048f6f265f8a2d5dcd4050c0da32bfa05f68.tar.xz
fix FS#9144 hopefully for good... only update the screen if the time line is selected, or if talking menus are disabled, only update if the time line is actually on the screen. Also only update every 5s so scrolling lines still scroll. (turns out scroll_all was broken! fixed now)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17944 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 96652ce..ee50ccf 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -786,6 +786,17 @@ bool list_do_action(int context, int timeout,
return gui_synclist_do_button(lists, action, wrap);
}
+bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
+ enum screen_type screen, int item)
+{
+ struct viewport vp = *lists->parent[screen];
+#ifdef HAVE_LCD_BITMAP
+ if (list_display_title(lists, lists->parent[screen]))
+ vp.height -= list_title_height(lists, lists->parent[screen]);
+#endif
+ return item <= (lists->start_item[screen] + viewport_get_nb_lines(&vp));
+}
+
/* Simple use list implementation */
static int simplelist_line_count = 0;
static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH];