diff options
author | William Wilgus <wilgus.william@gmail.com> | 2020-10-26 14:11:38 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2020-10-26 14:35:30 -0400 |
commit | ada919fc1122c314b239212a40d15c5ab131becd (patch) | |
tree | b5548c421e1b22c02a0c053a6db97e650eb7f139 /firmware/drivers/lcd-bitmap-common.c | |
parent | 9b295ce13577b5e2c2c7c122d1325a02d4569320 (diff) | |
download | rockbox-ada919fc1122c314b239212a40d15c5ab131becd.tar.gz rockbox-ada919fc1122c314b239212a40d15c5ab131becd.zip |
FIX RED framebuffer viewport rewrite
Change-Id: I4cb8f580e15440d06f8d5fabb2fbf5147c67b49c
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 183ab75820..d195fd8ebe 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -332,8 +332,8 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) { unsigned short *ucs; - struct font* pf = font_get(LCDFN(current_vp)->font); - int vp_flags = current_vp->flags; + struct font* pf = font_get(LCDFN(current_viewport)->font); + int vp_flags = LCDFN(current_viewport)->flags; const unsigned char *bits; int width; @@ -345,13 +345,13 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) /* center takes precedence */ if (vp_flags & VP_FLAG_ALIGN_CENTER) { - x = ((current_vp->width - w)/ 2) + x; + x = ((LCDFN(current_viewport)->width - w)/ 2) + x; if (x < 0) x = 0; } else { - x = current_vp->width - w - x; + x = LCDFN(current_viewport)->width - w - x; x += ofs; ofs = 0; } @@ -362,7 +362,7 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) { const unsigned short next_ch = ucs[1]; - if (x >= current_vp->width) + if (x >= LCDFN(current_viewport)->width) break; /* Get proportional width and glyph bits */ |