aboutsummaryrefslogtreecommitdiffstats
path: root/fbmngplay
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2007-02-09 16:20:23 +0000
committerFlorent Villard <warly@mandriva.com>2007-02-09 16:20:23 +0000
commit5462764073cb7fbda4d3662ab53df3d6ba9531d2 (patch)
tree9782ff518ec99e1660e5fd28b77e756a51d70c4c /fbmngplay
parent0949401e7084d42457ecf673fceefc9643f91348 (diff)
downloadbootsplash-5462764073cb7fbda4d3662ab53df3d6ba9531d2.tar
bootsplash-5462764073cb7fbda4d3662ab53df3d6ba9531d2.tar.gz
bootsplash-5462764073cb7fbda4d3662ab53df3d6ba9531d2.tar.bz2
bootsplash-5462764073cb7fbda4d3662ab53df3d6ba9531d2.tar.xz
bootsplash-5462764073cb7fbda4d3662ab53df3d6ba9531d2.zip
fix 16 bit mng displaying
Diffstat (limited to 'fbmngplay')
-rw-r--r--fbmngplay/mng.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fbmngplay/mng.c b/fbmngplay/mng.c
index d899bd0..bee9f46 100644
--- a/fbmngplay/mng.c
+++ b/fbmngplay/mng.c
@@ -226,7 +226,7 @@ static inline void copyline(unsigned char *dest, unsigned char *src,
a = a * mymng->alpha / 100;
switch (mymng->fbbpp) {
case 16:
- input = *((unsigned short *) background)++;
+ input = *background++ << 8 + *background++;
br = (input >> mng->fbredo) << (8-mng->fbredl);
bg = (input >> mng->fbgreeno) << (8-mng->fbgreenl);
@@ -273,7 +273,8 @@ static inline void copyline(unsigned char *dest, unsigned char *src,
output = (r << mng->fbredo) | (g << mng->fbgreeno) | (b << mng->fbblueo);
- *((unsigned short *) dest)++ = output;
+ *dest++ = output;
+ *dest++ = output >> 8;
break;
case 24:
*dest++ = b;