1
0
Fork 0
forked from len0rd/rockbox

Fixed the problem with the backdrops on iPod. The same problem was in the updated color picker and that is fixed too.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11195 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2006-10-11 23:26:17 +00:00
parent dc708c32a4
commit fa0ea19d5a
2 changed files with 10 additions and 6 deletions

View file

@ -72,14 +72,14 @@ static void unpack_rgb(struct rgb_pick *rgb)
{
unsigned color = rgb->color;
#if LCD_PIXELFORMAT == RGB565SWAPPED
swap16(color);
color = swap16(color);
#endif
rgb->r = (color & 0xf800) >> 11;
rgb->g = (color & 0x07e0) >> 5;
rgb->b = (color & 0x001f);
rgb->red = _RGB_UNPACK_RED(color);
rgb->green = _RGB_UNPACK_GREEN(color);
rgb->blue = _RGB_UNPACK_BLUE(color);
rgb->r = (color & 0xf800) >> 11;
rgb->g = (color & 0x07e0) >> 5;
rgb->b = (color & 0x001f);
}
/* Packs the native rgb colors into a color value */
@ -89,7 +89,7 @@ static void pack_rgb(struct rgb_pick *rgb)
(rgb->g & 0x3f) << 5 |
(rgb->b & 0x1f);
#if LCD_PIXELFORMAT == RGB565SWAPPED
swap16(color);
color = swap16(color);
#endif
rgb->color = color;
}

View file

@ -42,6 +42,10 @@
#pragma pack (push, 2)
#endif
//#undef LCD_RGBPACK
//#define LCD_RGBPACK(r, g, b) swap16(_RGBPACK((r), (g), (b)))
/* Struct from original code. */
struct Fileheader {
unsigned short Type; /* signature - 'BM' */
@ -128,7 +132,7 @@ static unsigned short dither_24_to_16(struct rgb_quad rgb, int row, int col)
color = (unsigned short)(b | (g << 5) | (r << 11));
#if LCD_PIXELFORMAT == RGB565SWAPPED
swap16(color);
color = swap16(color);
#endif
return color;
}