summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-07-02 13:02:57 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-07-02 13:02:57 +0000
commit144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8 (patch)
tree2f125a1c69bc37463b03d47b35918bab21cb9015
parentd69573e314a2524774a0dd7b0478c90c56c58546 (diff)
downloadrockbox-144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8.tar.gz
rockbox-144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8.zip
revert that scroll engine stuff... good in theory, but broken.
commit a band-aid fix for FS#9140 which is fine untill someone decides to not use the whole screen for it... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17916 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/yesno.c1
-rw-r--r--firmware/scroll_engine.c33
2 files changed, 5 insertions, 29 deletions
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c
index 40d1ed413f..297f7f8987 100644
--- a/apps/gui/yesno.c
+++ b/apps/gui/yesno.c
@@ -145,6 +145,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
145 yn[i].display=&screens[i]; 145 yn[i].display=&screens[i];
146 yn[i].vp = &vp[i]; 146 yn[i].vp = &vp[i];
147 viewport_set_defaults(yn[i].vp, i); 147 viewport_set_defaults(yn[i].vp, i);
148 screens[i].stop_scroll();
148 gui_yesno_draw(&(yn[i])); 149 gui_yesno_draw(&(yn[i]));
149 } 150 }
150 while (result==-1) 151 while (result==-1)
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 0b3de6f84a..6c7f7e6eb0 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -84,25 +84,6 @@ void lcd_stop_scroll(void)
84 lcd_scroll_info.lines = 0; 84 lcd_scroll_info.lines = 0;
85} 85}
86 86
87/* returns true if the 'line' in 'lines_vp' would scroll into 'othervp' */
88static bool line_overlaps_viewport(struct viewport *lines_vp, int line,
89 struct viewport *othervp)
90{
91#if 0
92#ifdef HAVE_LCD_BITMAP
93 int y = (font_get(lines_vp->font)->height*line) + lines_vp->y;
94#else
95 int y = lines_vp->y+line;
96#endif
97 if (y < othervp->y || y > othervp->y + othervp->height)
98 return false;
99 else if ((lines_vp->x + lines_vp->width < othervp->x) ||
100 (othervp->x + othervp->width < lines_vp->x))
101 return false;
102 return true;
103#endif
104 return false;
105}
106/* 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 */
107void lcd_scroll_stop_line(struct viewport* current_vp, int y) 88void lcd_scroll_stop_line(struct viewport* current_vp, int y)
108{ 89{
@@ -110,11 +91,8 @@ void lcd_scroll_stop_line(struct viewport* current_vp, int y)
110 91
111 while (i < lcd_scroll_info.lines) 92 while (i < lcd_scroll_info.lines)
112 { 93 {
113 if (((lcd_scroll_info.scroll[i].vp == current_vp) && 94 if ((lcd_scroll_info.scroll[i].vp == current_vp) &&
114 ((y < 0) || (lcd_scroll_info.scroll[i].y == y))) || 95 ((y < 0) || (lcd_scroll_info.scroll[i].y == y)))
115 ((lcd_scroll_info.scroll[i].vp != current_vp) &&
116 line_overlaps_viewport(lcd_scroll_info.scroll[i].vp,
117 lcd_scroll_info.scroll[i].y, current_vp)))
118 { 96 {
119 /* If i is not the last active line in the array, then move 97 /* If i is not the last active line in the array, then move
120 the last item to position i */ 98 the last item to position i */
@@ -189,11 +167,8 @@ void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y)
189 167
190 while (i < lcd_remote_scroll_info.lines) 168 while (i < lcd_remote_scroll_info.lines)
191 { 169 {
192 if (((lcd_remote_scroll_info.scroll[i].vp == current_vp) && 170 if ((lcd_remote_scroll_info.scroll[i].vp == current_vp) &&
193 ((y < 0) || (lcd_remote_scroll_info.scroll[i].y == y))) || 171 ((y < 0) || (lcd_remote_scroll_info.scroll[i].y == y)))
194 (((lcd_remote_scroll_info.scroll[i].vp != current_vp) &&
195 line_overlaps_viewport(lcd_scroll_info.scroll[i].vp,
196 lcd_scroll_info.scroll[i].y, current_vp))))
197 { 172 {
198 /* If i is not the last active line in the array, then move 173 /* If i is not the last active line in the array, then move
199 the last item to position i */ 174 the last item to position i */