diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2007-03-11 10:52:36 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2007-03-11 10:52:36 +0000 |
commit | 2eefb5acb847eeb2d10bac860d37c4cef00be67b (patch) | |
tree | bd08d1908d01e56c10a442c0b2fd8ef224fb982f /apps/gui/list.h | |
parent | 408dfd65ad61181b3612cb11574c9ff547e42d24 (diff) | |
download | rockbox-2eefb5acb847eeb2d10bac860d37c4cef00be67b.tar.gz rockbox-2eefb5acb847eeb2d10bac860d37c4cef00be67b.zip |
Optimized the gui list code performance, including automatic frame dropping and cpu boosting when button events are getting queued. Improved scrollwheel acceleration code is needed to notice a real change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12721 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r-- | apps/gui/list.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h index f6e4a5d615..26f58761b6 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -91,6 +91,10 @@ struct gui_list | |||
91 | int selected_size; | 91 | int selected_size; |
92 | /* The data that will be passed to the callback function YOU implement */ | 92 | /* The data that will be passed to the callback function YOU implement */ |
93 | void * data; | 93 | void * data; |
94 | /* These are used to calculate how much of the screen content we need | ||
95 | to redraw. */ | ||
96 | int last_displayed_selected_item; | ||
97 | int last_displayed_start_item; | ||
94 | /* The optional title, set to NULL for none */ | 98 | /* The optional title, set to NULL for none */ |
95 | char *title; | 99 | char *title; |
96 | /* Cache the width of the title string in pixels/characters */ | 100 | /* Cache the width of the title string in pixels/characters */ |
@@ -162,6 +166,7 @@ extern void gui_list_screen_scroll_out_of_view(bool enable); | |||
162 | struct gui_synclist | 166 | struct gui_synclist |
163 | { | 167 | { |
164 | struct gui_list gui_list[NB_SCREENS]; | 168 | struct gui_list gui_list[NB_SCREENS]; |
169 | struct gui_list *last_displayed[NB_SCREENS]; | ||
165 | }; | 170 | }; |
166 | 171 | ||
167 | extern void gui_synclist_init( | 172 | extern void gui_synclist_init( |