summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-01-31 00:40:14 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-01-31 00:40:14 +0000
commitea72d05ec6426b65d52fcbcfbbb008351830583f (patch)
treeb8ceafb4897decb40b301e4ea9da19ba24ddf3bc
parentd3784e5d082e114243d846685b50f31886ed5b7c (diff)
downloadrockbox-ea72d05ec6426b65d52fcbcfbbb008351830583f.tar.gz
rockbox-ea72d05ec6426b65d52fcbcfbbb008351830583f.tar.bz2
rockbox-ea72d05ec6426b65d52fcbcfbbb008351830583f.zip
Fixed endianness problem in the BMP loader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8498 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/bmp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index eb9bf903a6..e41bd2dd77 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -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;
}