forked from len0rd/rockbox
Fixed endianness problem in the BMP loader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8498 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d3784e5d08
commit
ea72d05ec6
1 changed files with 1 additions and 3 deletions
|
|
@ -344,9 +344,7 @@ int read_bmp_file(char* filename,
|
|||
} else {
|
||||
/* RGB24 -> RGB16 */
|
||||
for (col = 0; col < width; col++) {
|
||||
unsigned short rgb = (((p[2] >> 3) << 11) |
|
||||
((p[1] >> 2) << 5) |
|
||||
((p[0] >> 3)));
|
||||
unsigned short rgb = LCD_RGBPACK(p[2],p[1],p[0]);
|
||||
dest[width * (height - row - 1) + col] = rgb;
|
||||
p += 3;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue