forked from len0rd/rockbox
lcd_framebuffer bugfixes, sanity checks
several issues I saw that could pontentially cause problems scroll engine doesn't take text height into account when checking bounds NBELEMS was one whole row too large hopefully I got them right this time Change-Id: If303da8320429c3964fc675351cb088d46303745
This commit is contained in:
parent
202f9df0c1
commit
60f642ba4f
7 changed files with 55 additions and 24 deletions
|
@ -81,11 +81,12 @@ void lcd_clear_viewport(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!lcd_backdrop)
|
||||
if (lcd_backdrop && lcd_current_viewport->buffer == &lcd_framebuffer_default)
|
||||
{
|
||||
do
|
||||
{
|
||||
memset16(dst, lcd_current_viewport->bg_pattern, len);
|
||||
memcpy(dst, PTR_ADD(dst, lcd_backdrop_offset),
|
||||
len * sizeof(fb_data));
|
||||
dst += step;
|
||||
}
|
||||
while (dst <= dst_end);
|
||||
|
@ -94,8 +95,7 @@ void lcd_clear_viewport(void)
|
|||
{
|
||||
do
|
||||
{
|
||||
memcpy(dst, PTR_ADD(dst, lcd_backdrop_offset),
|
||||
len * sizeof(fb_data));
|
||||
memset16(dst, lcd_current_viewport->bg_pattern, len);
|
||||
dst += step;
|
||||
}
|
||||
while (dst <= dst_end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue