summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-09-04 16:04:02 +0000
committerNils Wallménius <nils@rockbox.org>2009-09-04 16:04:02 +0000
commit0cb68032275c7b15200a8766ed8c487689175b24 (patch)
tree1dd1c64f331a9e1ff0117d0feca2720594926752 /firmware
parentb5e39c15a55b3e46643bf3b46bb6c664b6cb50a4 (diff)
downloadrockbox-0cb68032275c7b15200a8766ed8c487689175b24.tar.gz
rockbox-0cb68032275c7b15200a8766ed8c487689175b24.zip
Const police raid\!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22621 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/scroll_engine.h8
-rw-r--r--firmware/scroll_engine.c15
2 files changed, 13 insertions, 10 deletions
diff --git a/firmware/export/scroll_engine.h b/firmware/export/scroll_engine.h
index 762761f213..0fcb06af81 100644
--- a/firmware/export/scroll_engine.h
+++ b/firmware/export/scroll_engine.h
@@ -29,13 +29,13 @@
29#include "file.h" 29#include "file.h"
30 30
31void scroll_init(void); 31void scroll_init(void);
32void lcd_scroll_stop(struct viewport* vp); 32void lcd_scroll_stop(const struct viewport* vp);
33void lcd_scroll_stop_line(struct viewport* vp, int y); 33void lcd_scroll_stop_line(const struct viewport* vp, int y);
34void lcd_scroll_fn(void); 34void lcd_scroll_fn(void);
35#ifdef HAVE_REMOTE_LCD 35#ifdef HAVE_REMOTE_LCD
36void lcd_remote_scroll_fn(void); 36void lcd_remote_scroll_fn(void);
37void lcd_remote_scroll_stop(struct viewport* vp); 37void lcd_remote_scroll_stop(const struct viewport* vp);
38void lcd_remote_scroll_stop_line(struct viewport* vp, int y); 38void lcd_remote_scroll_stop_line(const struct viewport* vp, int y);
39#endif 39#endif
40 40
41/* internal usage, but in multiple drivers */ 41/* internal usage, but in multiple drivers */
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 8d84c797e9..b7e0601150 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -85,7 +85,7 @@ void lcd_stop_scroll(void)
85} 85}
86 86
87/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */ 87/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */
88void lcd_scroll_stop_line(struct viewport* current_vp, int y) 88void lcd_scroll_stop_line(const struct viewport* current_vp, int y)
89{ 89{
90 int i = 0; 90 int i = 0;
91 91
@@ -98,7 +98,8 @@ void lcd_scroll_stop_line(struct viewport* current_vp, int y)
98 the last item to position i */ 98 the last item to position i */
99 if ((i + 1) != lcd_scroll_info.lines) 99 if ((i + 1) != lcd_scroll_info.lines)
100 { 100 {
101 lcd_scroll_info.scroll[i] = lcd_scroll_info.scroll[lcd_scroll_info.lines-1]; 101 lcd_scroll_info.scroll[i] =
102 lcd_scroll_info.scroll[lcd_scroll_info.lines-1];
102 } 103 }
103 lcd_scroll_info.lines--; 104 lcd_scroll_info.lines--;
104 105
@@ -115,7 +116,7 @@ void lcd_scroll_stop_line(struct viewport* current_vp, int y)
115} 116}
116 117
117/* Stop all scrolling lines in the specified viewport */ 118/* Stop all scrolling lines in the specified viewport */
118void lcd_scroll_stop(struct viewport* vp) 119void lcd_scroll_stop(const struct viewport* vp)
119{ 120{
120 lcd_scroll_stop_line(vp, -1); 121 lcd_scroll_stop_line(vp, -1);
121} 122}
@@ -161,7 +162,7 @@ void lcd_remote_stop_scroll(void)
161} 162}
162 163
163/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */ 164/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */
164void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y) 165void lcd_remote_scroll_stop_line(const struct viewport* current_vp, int y)
165{ 166{
166 int i = 0; 167 int i = 0;
167 168
@@ -174,7 +175,8 @@ void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y)
174 the last item to position i */ 175 the last item to position i */
175 if ((i + 1) != lcd_remote_scroll_info.lines) 176 if ((i + 1) != lcd_remote_scroll_info.lines)
176 { 177 {
177 lcd_remote_scroll_info.scroll[i] = lcd_remote_scroll_info.scroll[lcd_remote_scroll_info.lines-1]; 178 lcd_remote_scroll_info.scroll[i] =
179 lcd_remote_scroll_info.scroll[lcd_remote_scroll_info.lines-1];
178 } 180 }
179 lcd_remote_scroll_info.lines--; 181 lcd_remote_scroll_info.lines--;
180 182
@@ -191,7 +193,7 @@ void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y)
191} 193}
192 194
193/* Stop all scrolling lines in the specified viewport */ 195/* Stop all scrolling lines in the specified viewport */
194void lcd_remote_scroll_stop(struct viewport* vp) 196void lcd_remote_scroll_stop(const struct viewport* vp)
195{ 197{
196 lcd_remote_scroll_stop_line(vp, -1); 198 lcd_remote_scroll_stop_line(vp, -1);
197} 199}
@@ -346,3 +348,4 @@ void scroll_init(void)
346 IF_PRIO(, PRIORITY_USER_INTERFACE) 348 IF_PRIO(, PRIORITY_USER_INTERFACE)
347 IF_COP(, CPU)); 349 IF_COP(, CPU));
348} 350}
351