mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
FIX RED framebuffer viewport rewrite
Change-Id: I4cb8f580e15440d06f8d5fabb2fbf5147c67b49c
This commit is contained in:
parent
9b295ce135
commit
ada919fc11
3 changed files with 9 additions and 6 deletions
|
@ -885,6 +885,9 @@ void lcd_refreshline(void)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
|
||||||
|
fb_data *lcd_fb = get_framebuffer();
|
||||||
|
#endif
|
||||||
updatepatpix();
|
updatepatpix();
|
||||||
|
|
||||||
L = R_LY;
|
L = R_LY;
|
||||||
|
|
|
@ -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)
|
static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
|
||||||
{
|
{
|
||||||
unsigned short *ucs;
|
unsigned short *ucs;
|
||||||
struct font* pf = font_get(LCDFN(current_vp)->font);
|
struct font* pf = font_get(LCDFN(current_viewport)->font);
|
||||||
int vp_flags = current_vp->flags;
|
int vp_flags = LCDFN(current_viewport)->flags;
|
||||||
const unsigned char *bits;
|
const unsigned char *bits;
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
|
@ -345,13 +345,13 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
|
||||||
/* center takes precedence */
|
/* center takes precedence */
|
||||||
if (vp_flags & VP_FLAG_ALIGN_CENTER)
|
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)
|
if (x < 0)
|
||||||
x = 0;
|
x = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x = current_vp->width - w - x;
|
x = LCDFN(current_viewport)->width - w - x;
|
||||||
x += ofs;
|
x += ofs;
|
||||||
ofs = 0;
|
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];
|
const unsigned short next_ch = ucs[1];
|
||||||
|
|
||||||
if (x >= current_vp->width)
|
if (x >= LCDFN(current_viewport)->width)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Get proportional width and glyph bits */
|
/* Get proportional width and glyph bits */
|
||||||
|
|
|
@ -494,7 +494,7 @@ void lcd_update(void)
|
||||||
|
|
||||||
lcd_begin_write_gram();
|
lcd_begin_write_gram();
|
||||||
|
|
||||||
lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT);
|
lcd_write_data((unsigned short *)FBADDR(0,0), LCD_WIDTH*LCD_HEIGHT);
|
||||||
} /* lcd_update */
|
} /* lcd_update */
|
||||||
|
|
||||||
/* Update a fraction of the display. */
|
/* Update a fraction of the display. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue