diff -u -r rockbox-bleeding/firmware/drivers/lcd-16bit.c rockbox-patched/firmware/drivers/lcd-16bit.c --- rockbox-bleeding/firmware/drivers/lcd-16bit.c 2007-09-21 10:41:25.000000000 -0400 +++ rockbox-patched/firmware/drivers/lcd-16bit.c 2007-09-23 01:21:44.000000000 -0400 @@ -809,7 +809,10 @@ int lastmode = drawmode; int oldfgcolor = fg_pattern; int oldbgcolor = bg_pattern; - + int h_r = _RGB_UNPACK_RED(ls_pattern); + int h_b = _RGB_UNPACK_BLUE(ls_pattern); + int h_g = _RGB_UNPACK_GREEN(ls_pattern); + int count=0; /* make sure scrolling is turned off on the line we are updating */ lcd_scroll_info.lines &= ~(1 << y); @@ -822,8 +825,7 @@ drawmode = (style & STYLE_INVERT) ? (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; if (style & STYLE_HIGHLIGHT) { - fg_pattern = lst_pattern; - bg_pattern = ls_pattern; + fg_pattern = ls_pattern; } else if (style & STYLE_COLORED) { if (drawmode == DRMODE_SOLID) @@ -831,10 +833,26 @@ else bg_pattern = style & STYLE_COLOR_MASK; } - lcd_putsxyofs(xpos, ypos, offset, str); drawmode ^= DRMODE_INVERSEVID; xrect = xpos + MAX(w - offset, 0); + if (style & STYLE_HIGHLIGHT) { + drawmode = DRMODE_FG; + for(count = 0; count<=h;count++) { + lcd_hline(0, LCD_WIDTH , ypos + count); + h_r-= h_r/h; + h_g-= h_g/h; + h_b-= h_b/h; + fg_pattern = _RGBPACK(h_r,h_g,h_b); + } + fg_pattern = lst_pattern; + } + else + { lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h); + drawmode = (style & STYLE_INVERT) ? + (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; + } + lcd_putsxyofs(xpos, ypos, offset, str); drawmode = lastmode; fg_pattern = oldfgcolor; bg_pattern = oldbgcolor; @@ -928,6 +946,11 @@ int lastmode; unsigned old_fgcolor = fg_pattern; unsigned old_bgcolor = bg_pattern; + int h_r = _RGB_UNPACK_RED(ls_pattern); + int h_b = _RGB_UNPACK_BLUE(ls_pattern); + int h_g = _RGB_UNPACK_GREEN(ls_pattern); + int count=0; for ( index = 0; index < LCD_SCROLLABLE_LINES; index++ ) { /* really scroll? */ @@ -984,8 +1007,15 @@ drawmode = s->invert == 1 ? (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; if (s->invert == 2) { - fg_pattern = lst_pattern; - bg_pattern = ls_pattern; + fg_pattern = ls_pattern; + drawmode = DRMODE_FG; + for(count = 0; count<=pf->height;count++) { + lcd_hline(0, LCD_WIDTH , ypos + count); + h_r-= h_r/pf->height; + h_g-= h_g/pf->height; + h_b-= h_b/pf->height; + fg_pattern = _RGBPACK(h_r,h_g,h_b); + } } lcd_putsxyofs(xpos, ypos, s->offset, s->line); drawmode = lastmode;