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
This commit is contained in:
parent
b4efbdcdbb
commit
33bd218010
5 changed files with 15 additions and 11 deletions
|
@ -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,
|
void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
|
||||||
int offset)
|
int offset)
|
||||||
{
|
{
|
||||||
int xpos,ypos,w,h;
|
int xpos,ypos,w,h,xrect;
|
||||||
int lastmode = drawmode;
|
int lastmode = drawmode;
|
||||||
|
|
||||||
/* make sure scrolling is turned off on the line we are updating */
|
/* 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;
|
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
|
||||||
lcd_putsxyofs(xpos, ypos, offset, str);
|
lcd_putsxyofs(xpos, ypos, offset, str);
|
||||||
drawmode ^= DRMODE_INVERSEVID;
|
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;
|
drawmode = lastmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
void lcd_puts_style_offset(int x, int y, const unsigned char *str,
|
||||||
int style, int offset)
|
int style, int offset)
|
||||||
{
|
{
|
||||||
int xpos,ypos,w,h;
|
int xpos,ypos,w,h,xrect;
|
||||||
int lastmode = drawmode;
|
int lastmode = drawmode;
|
||||||
|
|
||||||
/* make sure scrolling is turned off on the line we are updating */
|
/* 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;
|
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
|
||||||
lcd_putsxyofs(xpos, ypos, offset, str);
|
lcd_putsxyofs(xpos, ypos, offset, str);
|
||||||
drawmode ^= DRMODE_INVERSEVID;
|
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;
|
drawmode = lastmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
void lcd_remote_puts_style_offset(int x, int y, const unsigned char *str,
|
||||||
int style, int offset)
|
int style, int offset)
|
||||||
{
|
{
|
||||||
int xpos,ypos,w,h;
|
int xpos,ypos,w,h,xrect;
|
||||||
int lastmode = drawmode;
|
int lastmode = drawmode;
|
||||||
|
|
||||||
/* make sure scrolling is turned off on the line we are updating */
|
/* 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;
|
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
|
||||||
lcd_remote_putsxyofs(xpos, ypos, offset, str);
|
lcd_remote_putsxyofs(xpos, ypos, offset, str);
|
||||||
drawmode ^= DRMODE_INVERSEVID;
|
drawmode ^= DRMODE_INVERSEVID;
|
||||||
lcd_remote_fillrect(xpos + w - offset, ypos,
|
xrect = xpos + MAX(w - offset, 0);
|
||||||
LCD_REMOTE_WIDTH - (xpos + w - offset), h);
|
lcd_remote_fillrect(xrect, ypos, LCD_REMOTE_WIDTH - xrect, h);
|
||||||
drawmode = lastmode;
|
drawmode = lastmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
void lcd_puts_style_offset(int x, int y, const unsigned char *str,
|
||||||
int style, int offset)
|
int style, int offset)
|
||||||
{
|
{
|
||||||
int xpos,ypos,w,h;
|
int xpos,ypos,w,h,xrect;
|
||||||
int lastmode = drawmode;
|
int lastmode = drawmode;
|
||||||
|
|
||||||
/* make sure scrolling is turned off on the line we are updating */
|
/* 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;
|
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
|
||||||
lcd_putsxyofs(xpos, ypos, offset, str);
|
lcd_putsxyofs(xpos, ypos, offset, str);
|
||||||
drawmode ^= DRMODE_INVERSEVID;
|
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;
|
drawmode = lastmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
void lcd_puts_style_offset(int x, int y, const unsigned char *str,
|
||||||
int style, int offset)
|
int style, int offset)
|
||||||
{
|
{
|
||||||
int xpos,ypos,w,h;
|
int xpos,ypos,w,h,xrect;
|
||||||
int lastmode = drawmode;
|
int lastmode = drawmode;
|
||||||
|
|
||||||
/* make sure scrolling is turned off on the line we are updating */
|
/* 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;
|
(DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
|
||||||
lcd_putsxyofs(xpos, ypos, offset, str);
|
lcd_putsxyofs(xpos, ypos, offset, str);
|
||||||
drawmode ^= DRMODE_INVERSEVID;
|
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;
|
drawmode = lastmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue