Commit 8e50010b authored by hybrid's avatar hybrid

Fix alignment problem with odd sized images

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4286 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 820108a7
...@@ -941,15 +941,22 @@ static void executeBlit_Color_16_to_16( const SBlitJob * job ) ...@@ -941,15 +941,22 @@ static void executeBlit_Color_16_to_16( const SBlitJob * job )
} }
else else
{ {
s32 dx = job->width - 1; const s32 dx = job->width - 1;
for ( s32 dy = 0; dy != job->height; ++dy ) for ( s32 dy = 0; dy != job->height; ++dy )
{ {
memset32( dst, c, job->srcPitch ); if ((((long)dst)&0x10)==0)
dst[dx] = c0; {
memset32(dst, c, job->srcPitch);
dst[dx] = c0;
}
else
{
dst[0] = c0;
memset32(dst+1, c, job->srcPitch-1);
}
dst = (u16*) ( (u8*) (dst) + job->dstPitch ); dst = (u16*) ( (u8*) (dst) + job->dstPitch );
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment