summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-05-06 06:37:23 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-05-06 06:37:23 +0000
commit33bd2180107848d3ac9af0411cd9d5cd44dbe697 (patch)
tree3450b4884057073c95165fa5d29fd651e6aeec91 /firmware
parentb4efbdcdbb14132e474a74f16ea13f06bd219104 (diff)
downloadrockbox-33bd2180107848d3ac9af0411cd9d5cd44dbe697.tar.gz
rockbox-33bd2180107848d3ac9af0411cd9d5cd44dbe697.tar.bz2
rockbox-33bd2180107848d3ac9af0411cd9d5cd44dbe697.zip
Patch #5182 by Liberman Shachar - Vertical screen scroll bug fix (inverse bar crop in vertical scroll)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9881 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, 15 insertions, 11 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index c3307a560a..ebf714709c 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -782,7 +782,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, 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 xpos,ypos,w,h,xrect;
int lastmode = drawmode;
/* make sure scrolling is turned off on the line we are updating */
@@ -798,7 +798,8 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
- lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
+ xrect = xpos + MAX(w - offset, 0);
+ lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h);
drawmode = lastmode;
}
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c
index abe608f6b6..14bf952bb2 100644
--- a/firmware/drivers/lcd-2bit-horz.c
+++ b/firmware/drivers/lcd-2bit-horz.c
@@ -747,7 +747,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, 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 xpos,ypos,w,h,xrect;
int lastmode = drawmode;
/* make sure scrolling is turned off on the line we are updating */
@@ -763,7 +763,8 @@ 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 - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
+ xrect = xpos + MAX(w - offset, 0);
+ lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h);
drawmode = lastmode;
}
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c
index 2d16a08a24..d023aeb94b 100644
--- a/firmware/drivers/lcd-h100-remote.c
+++ b/firmware/drivers/lcd-h100-remote.c
@@ -1210,7 +1210,7 @@ void lcd_remote_puts_offset(int x, int y, const unsigned char *str, 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 xpos,ypos,w,h,xrect;
int lastmode = drawmode;
/* make sure scrolling is turned off on the line we are updating */
@@ -1226,8 +1226,8 @@ void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str,
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
lcd_remote_putsxyofs(xpos, ypos, offset, str);
drawmode ^= DRMODE_INVERSEVID;
- lcd_remote_fillrect(xpos + w - offset, ypos,
- LCD_REMOTE_WIDTH - (xpos + w - offset), h);
+ xrect = xpos + MAX(w - offset, 0);
+ lcd_remote_fillrect(xrect, ypos, LCD_REMOTE_WIDTH - xrect, h);
drawmode = lastmode;
}
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index 85b8b0229e..42bf13a888 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -1081,7 +1081,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, 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 xpos,ypos,w,h,xrect;
int lastmode = drawmode;
/* make sure scrolling is turned off on the line we are updating */
@@ -1097,7 +1097,8 @@ 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 - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
+ xrect = xpos + MAX(w - offset, 0);
+ lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h);
drawmode = lastmode;
}
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index 8914e272ec..d75b989dd2 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -933,7 +933,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, 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 xpos,ypos,w,h,xrect;
int lastmode = drawmode;
/* make sure scrolling is turned off on the line we are updating */
@@ -949,7 +949,8 @@ 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 - offset, ypos, LCD_WIDTH - (xpos + w - offset), h);
+ xrect = xpos + MAX(w - offset, 0);
+ lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h);
drawmode = lastmode;
}