1
0
Fork 0
forked from len0rd/rockbox

Add a delay between text scroll rounds when scrolling forward similarly to how it's done when scrolling bidirectionally (FS#11892)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29104 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alexander Levin 2011-01-21 17:16:45 +00:00
parent a6debb65fa
commit 52c6789450
2 changed files with 8 additions and 4 deletions

View file

@ -470,8 +470,10 @@ void LCDFN(scroll_fn)(void)
} }
else { else {
/* scroll forward the whole time */ /* scroll forward the whole time */
if (s->offset >= s->width) if (s->offset >= s->width) {
s->offset %= s->width; s->offset = 0;
s->start_tick = current_tick + LCDFN(scroll_info).delay * 2;
}
} }
LCDFN(putsxyofs_style)(xpos, ypos, s->line, s->style, s->width, LCDFN(putsxyofs_style)(xpos, ypos, s->line, s->style, s->width,
pf->height, s->offset); pf->height, s->offset);

View file

@ -605,8 +605,10 @@ void lcd_scroll_fn(void)
} }
else /* scroll forward the whole time */ else /* scroll forward the whole time */
{ {
if (s->offset >= s->len) if (s->offset >= s->len) {
s->offset -= s->len; s->offset = 0;
s->start_tick = current_tick + lcd_scroll_info.delay * 2;
}
} }
lcd_putsxyofs(xpos, ypos, s->offset, s->line); lcd_putsxyofs(xpos, ypos, s->offset, s->line);