summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 14:11:38 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 14:35:30 -0400
commitada919fc1122c314b239212a40d15c5ab131becd (patch)
treeb5548c421e1b22c02a0c053a6db97e650eb7f139 /firmware
parent9b295ce13577b5e2c2c7c122d1325a02d4569320 (diff)
downloadrockbox-ada919fc1122c314b239212a40d15c5ab131becd.tar.gz
rockbox-ada919fc1122c314b239212a40d15c5ab131becd.zip
FIX RED framebuffer viewport rewrite
Change-Id: I4cb8f580e15440d06f8d5fabb2fbf5147c67b49c
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c10
-rw-r--r--firmware/target/coldfire/iaudio/x5/lcd-x5.c2
2 files changed, 6 insertions, 6 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)
332static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str) 332static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
333{ 333{
334 unsigned short *ucs; 334 unsigned short *ucs;
335 struct font* pf = font_get(LCDFN(current_vp)->font); 335 struct font* pf = font_get(LCDFN(current_viewport)->font);
336 int vp_flags = current_vp->flags; 336 int vp_flags = LCDFN(current_viewport)->flags;
337 const unsigned char *bits; 337 const unsigned char *bits;
338 int width; 338 int width;
339 339
@@ -345,13 +345,13 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
345 /* center takes precedence */ 345 /* center takes precedence */
346 if (vp_flags & VP_FLAG_ALIGN_CENTER) 346 if (vp_flags & VP_FLAG_ALIGN_CENTER)
347 { 347 {
348 x = ((current_vp->width - w)/ 2) + x; 348 x = ((LCDFN(current_viewport)->width - w)/ 2) + x;
349 if (x < 0) 349 if (x < 0)
350 x = 0; 350 x = 0;
351 } 351 }
352 else 352 else
353 { 353 {
354 x = current_vp->width - w - x; 354 x = LCDFN(current_viewport)->width - w - x;
355 x += ofs; 355 x += ofs;
356 ofs = 0; 356 ofs = 0;
357 } 357 }
@@ -362,7 +362,7 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
362 { 362 {
363 const unsigned short next_ch = ucs[1]; 363 const unsigned short next_ch = ucs[1];
364 364
365 if (x >= current_vp->width) 365 if (x >= LCDFN(current_viewport)->width)
366 break; 366 break;
367 367
368 /* Get proportional width and glyph bits */ 368 /* Get proportional width and glyph bits */
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
index cf6e301c16..266a381c40 100644
--- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
@@ -494,7 +494,7 @@ void lcd_update(void)
494 494
495 lcd_begin_write_gram(); 495 lcd_begin_write_gram();
496 496
497 lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT); 497 lcd_write_data((unsigned short *)FBADDR(0,0), LCD_WIDTH*LCD_HEIGHT);
498} /* lcd_update */ 498} /* lcd_update */
499 499
500/* Update a fraction of the display. */ 500/* Update a fraction of the display. */