1
0
Fork 0
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:
Linus Nielsen Feltzing 2006-01-31 00:40:14 +00:00
parent d3784e5d08
commit ea72d05ec6

View file

@ -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;
}