summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-05-03 20:22:03 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-05-03 20:22:03 +0000
commit69433c8667846672d2297380b4a34ef382b53062 (patch)
tree6904a08fa3ae72997b9c353eee3542ed18d94314 /firmware
parent28b5afd05a075cce1f46e5cc85c7e2caae3fc6ee (diff)
downloadrockbox-69433c8667846672d2297380b4a34ef382b53062.tar.gz
rockbox-69433c8667846672d2297380b4a34ef382b53062.tar.bz2
rockbox-69433c8667846672d2297380b4a34ef382b53062.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-16bit.c5
-rw-r--r--firmware/drivers/lcd-2bit-horz.c5
-rw-r--r--firmware/drivers/lcd-h100-remote.c6
-rw-r--r--firmware/drivers/lcd-h100.c5
-rw-r--r--firmware/drivers/lcd-recorder.c5
5 files changed, 16 insertions, 10 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index d337ea95a4..c3307a560a 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -779,7 +779,8 @@ void lcd_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_puts_style_offset(int x, int y, const unsigned char *str, int style, int offset)
+void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
+ int offset)
{
int xpos,ypos,w,h;
int lastmode = drawmode;
@@ -797,7 +798,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, in
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
- lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
+ lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
drawmode = lastmode;
}
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c
index f965e1b707..abe608f6b6 100644
--- a/firmware/drivers/lcd-2bit-horz.c
+++ b/firmware/drivers/lcd-2bit-horz.c
@@ -710,7 +710,8 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
bits = font_get_bits(pf, ch);
- lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
+ lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs,
+ pf->height);
x += width - ofs;
ofs = 0;
@@ -762,7 +763,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str,
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
- lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
+ lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
drawmode = lastmode;
}
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;
}
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index 8a06367112..85b8b0229e 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -1044,7 +1044,8 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
bits = font_get_bits(pf, ch);
- lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
+ lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs,
+ pf->height);
x += width - ofs;
ofs = 0;
@@ -1096,7 +1097,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str,
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
- lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
+ lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
drawmode = lastmode;
}
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index 89b041dc3d..8914e272ec 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -897,7 +897,8 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
bits = font_get_bits(pf, ch);
- lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
+ lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs,
+ pf->height);
x += width - ofs;
ofs = 0;
@@ -948,7 +949,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str,
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
- lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
+ lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
drawmode = lastmode;
}