mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-16 03:27:39 -04:00
Clip bottom & right when positioning the gfx display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5926 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
661b981387
commit
aa6ec9530e
1 changed files with 4 additions and 2 deletions
|
@ -76,9 +76,11 @@ void pgfx_release(void)
|
||||||
void pgfx_display(int cx, int cy)
|
void pgfx_display(int cx, int cy)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
int width = MIN(char_width, 11 - cx);
|
||||||
|
int height = MIN(char_height, 2 - cy);
|
||||||
|
|
||||||
for (i = 0; i < char_width; i++)
|
for (i = 0; i < width; i++)
|
||||||
for (j = 0; j < char_height; j++)
|
for (j = 0; j < height; j++)
|
||||||
pgfx_rb->lcd_putc(cx + i, cy + j, gfx_chars[char_height * i + j]);
|
pgfx_rb->lcd_putc(cx + i, cy + j, gfx_chars[char_height * i + j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue