From aa6ec9530ea877a1fc6081788eafa69b91a6ee16 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 12 Feb 2005 01:32:05 +0000 Subject: Clip bottom & right when positioning the gfx display. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5926 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/playergfx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/plugins/lib/playergfx.c') diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c index 5175061642..d227d608a7 100644 --- a/apps/plugins/lib/playergfx.c +++ b/apps/plugins/lib/playergfx.c @@ -76,9 +76,11 @@ void pgfx_release(void) void pgfx_display(int cx, int cy) { 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 (j = 0; j < char_height; j++) + for (i = 0; i < width; i++) + for (j = 0; j < height; j++) pgfx_rb->lcd_putc(cx + i, cy + j, gfx_chars[char_height * i + j]); } -- cgit v1.2.3