From 5462764073cb7fbda4d3662ab53df3d6ba9531d2 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Fri, 9 Feb 2007 16:20:23 +0000 Subject: fix 16 bit mng displaying --- fbmngplay/mng.c | 5 +++-- 1 file 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; -- cgit v1.2.1