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:
parent
dc708c32a4
commit
fa0ea19d5a
2 changed files with 10 additions and 6 deletions
|
|
@ -72,14 +72,14 @@ static void unpack_rgb(struct rgb_pick *rgb)
|
||||||
{
|
{
|
||||||
unsigned color = rgb->color;
|
unsigned color = rgb->color;
|
||||||
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
||||||
swap16(color);
|
color = swap16(color);
|
||||||
#endif
|
#endif
|
||||||
rgb->r = (color & 0xf800) >> 11;
|
|
||||||
rgb->g = (color & 0x07e0) >> 5;
|
|
||||||
rgb->b = (color & 0x001f);
|
|
||||||
rgb->red = _RGB_UNPACK_RED(color);
|
rgb->red = _RGB_UNPACK_RED(color);
|
||||||
rgb->green = _RGB_UNPACK_GREEN(color);
|
rgb->green = _RGB_UNPACK_GREEN(color);
|
||||||
rgb->blue = _RGB_UNPACK_BLUE(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 */
|
/* 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->g & 0x3f) << 5 |
|
||||||
(rgb->b & 0x1f);
|
(rgb->b & 0x1f);
|
||||||
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
||||||
swap16(color);
|
color = swap16(color);
|
||||||
#endif
|
#endif
|
||||||
rgb->color = color;
|
rgb->color = color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,10 @@
|
||||||
#pragma pack (push, 2)
|
#pragma pack (push, 2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//#undef LCD_RGBPACK
|
||||||
|
//#define LCD_RGBPACK(r, g, b) swap16(_RGBPACK((r), (g), (b)))
|
||||||
|
|
||||||
|
|
||||||
/* Struct from original code. */
|
/* Struct from original code. */
|
||||||
struct Fileheader {
|
struct Fileheader {
|
||||||
unsigned short Type; /* signature - 'BM' */
|
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));
|
color = (unsigned short)(b | (g << 5) | (r << 11));
|
||||||
|
|
||||||
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
||||||
swap16(color);
|
color = swap16(color);
|
||||||
#endif
|
#endif
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue