From 69433c8667846672d2297380b4a34ef382b53062 Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Wed, 3 May 2006 20:22:03 +0000 Subject: Fix fillrect calculation error for 'Screen scrolls out of view'. Fixes bug 5267. Also some minor code policing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9871 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-h100-remote.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'firmware/drivers/lcd-h100-remote.c') diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index f1d1956afe..2d16a08a24 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c @@ -1207,7 +1207,8 @@ void lcd_remote_puts_offset(int x, int y, const unsigned char *str, int offset) /* put a string at a given char position, style, and pixel position, * skipping first offset pixel columns */ -void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str, int style, int offset) +void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str, + int style, int offset) { int xpos,ypos,w,h; int lastmode = drawmode; @@ -1225,7 +1226,8 @@ void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str, int st (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; lcd_remote_putsxyofs(xpos, ypos, offset, str); drawmode ^= DRMODE_INVERSEVID; - lcd_remote_fillrect(xpos + w, ypos, LCD_REMOTE_WIDTH - (xpos + w), h); + lcd_remote_fillrect(xpos + w - offset, ypos, + LCD_REMOTE_WIDTH - (xpos + w - offset), h); drawmode = lastmode; } -- cgit v1.2.3