diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-07-02 13:02:57 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-07-02 13:02:57 +0000 |
| commit | 144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8 (patch) | |
| tree | 2f125a1c69bc37463b03d47b35918bab21cb9015 | |
| parent | d69573e314a2524774a0dd7b0478c90c56c58546 (diff) | |
| download | rockbox-144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8.zip rockbox-144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8.tar.gz rockbox-144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8.tar.bz2 rockbox-144f39b4ea134ab3efc0d47d99ce81cb5c91cdd8.tar.xz | |
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.c | 1 | ||||
| -rw-r--r-- | firmware/scroll_engine.c | 33 |
2 files changed, 5 insertions, 29 deletions
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 40d1ed4..297f7f8 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, yn[i].display=&screens[i]; yn[i].vp = &vp[i]; viewport_set_defaults(yn[i].vp, i); + screens[i].stop_scroll(); gui_yesno_draw(&(yn[i])); } while (result==-1) diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index 0b3de6f..6c7f7e6 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c @@ -84,25 +84,6 @@ void lcd_stop_scroll(void) lcd_scroll_info.lines = 0; } -/* returns true if the 'line' in 'lines_vp' would scroll into 'othervp' */ -static bool line_overlaps_viewport(struct viewport *lines_vp, int line, - struct viewport *othervp) -{ -#if 0 -#ifdef HAVE_LCD_BITMAP - int y = (font_get(lines_vp->font)->height*line) + lines_vp->y; -#else - int y = lines_vp->y+line; -#endif - if (y < othervp->y || y > othervp->y + othervp->height) - return false; - else if ((lines_vp->x + lines_vp->width < othervp->x) || - (othervp->x + othervp->width < lines_vp->x)) - return false; - return true; -#endif - return false; -} /* Stop scrolling line y in the specified viewport, or all lines if y < 0 */ void lcd_scroll_stop_line(struct viewport* current_vp, int y) { @@ -110,11 +91,8 @@ void lcd_scroll_stop_line(struct viewport* current_vp, int y) while (i < lcd_scroll_info.lines) { - if (((lcd_scroll_info.scroll[i].vp == current_vp) && - ((y < 0) || (lcd_scroll_info.scroll[i].y == y))) || - ((lcd_scroll_info.scroll[i].vp != current_vp) && - line_overlaps_viewport(lcd_scroll_info.scroll[i].vp, - lcd_scroll_info.scroll[i].y, current_vp))) + if ((lcd_scroll_info.scroll[i].vp == current_vp) && + ((y < 0) || (lcd_scroll_info.scroll[i].y == y))) { /* If i is not the last active line in the array, then move the last item to position i */ @@ -189,11 +167,8 @@ void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y) while (i < lcd_remote_scroll_info.lines) { - if (((lcd_remote_scroll_info.scroll[i].vp == current_vp) && - ((y < 0) || (lcd_remote_scroll_info.scroll[i].y == y))) || - (((lcd_remote_scroll_info.scroll[i].vp != current_vp) && - line_overlaps_viewport(lcd_scroll_info.scroll[i].vp, - lcd_scroll_info.scroll[i].y, current_vp)))) + if ((lcd_remote_scroll_info.scroll[i].vp == current_vp) && + ((y < 0) || (lcd_remote_scroll_info.scroll[i].y == y))) { /* If i is not the last active line in the array, then move the last item to position i */ |