forked from len0rd/rockbox
[Bugfix] Scroll engine, backwards scrolling causes display corruption
When a line is over a selected length bi-directional scrolling is disabled. In non bidir scrolling the string is copied to a buffer twice with a space between "scroll text" + " " + "scroll text" this is to allow scrolling the line in the forward direction with minimal extra logic Note: that is the ONLY direction it is equiped to handle In the USB screen I observed while switching through the different modes that sometimes the text was corrupted turns out you can still have scroll->backwards set to true which causes offset to go negatve but we never check if offset < 0 in non bidir scrolling mode and happily continue with ever more negative offsets Change-Id: I210f7880be953d3cc42469828a7ca5fc2b2ab96f
This commit is contained in:
parent
dec8d4101d
commit
fffae07833
1 changed files with 1 additions and 0 deletions
|
@ -148,6 +148,7 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
|
|||
}
|
||||
else
|
||||
{
|
||||
s->backward = false; /* bugfix we only account for forward scrolling here */
|
||||
snprintf(line_buf, sizeof(line_buf)-1, "%s%s%s",
|
||||
s->linebuffer, " ", s->linebuffer);
|
||||
s->line = line_buf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue