mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
lcd: Fix update_viewport() for non-default stride viewports
Simplify update_viewport() by calling update_viewport_rect(). The resulting LCD driver calls are the same either way and for some reason, update_viewport() didn't handle non-default stride viewports correctly. Change-Id: Ic34d3d40e4f758db897cb3944d9d7475bbdb4d2c
This commit is contained in:
parent
9549ddabba
commit
c607bfac6f
1 changed files with 1 additions and 20 deletions
|
@ -342,27 +342,8 @@ struct viewport* LCDFN(set_viewport)(struct viewport* vp)
|
|||
|
||||
void LCDFN(update_viewport)(void)
|
||||
{
|
||||
|
||||
struct viewport* vp = LCDFN(current_viewport);
|
||||
if ((vp->flags & VP_FLAG_OWNER_UPDATE) == VP_FLAG_OWNER_UPDATE)
|
||||
{
|
||||
#ifdef LOGF_ENABLE
|
||||
logf("%s ignored - owner update", __func__);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
int x, y;
|
||||
if (vp->buffer->stride != LCDFN(framebuffer_default.stride))
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = vp->x;
|
||||
y = vp->y;
|
||||
}
|
||||
LCDFN(update_rect)(x, y, vp->width, vp->height);
|
||||
LCDFN(update_viewport_rect)(0, 0, vp->width, vp->height);
|
||||
}
|
||||
|
||||
void LCDFN(update_viewport_rect)(int x, int y, int width, int height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue