From: John Hodge Date: Sun, 23 Oct 2011 13:45:08 +0000 (+0800) Subject: Kernel/DrvUtil - Fixed compile error on ARMv7 X-Git-Tag: rel0.14~204 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=fbdd21a0e8d76cd892dd6417bf691b931c4fb812;p=tpg%2Facess2.git Kernel/DrvUtil - Fixed compile error on ARMv7 --- diff --git a/Kernel/drvutil.c b/Kernel/drvutil.c index 41df6046..9d1590b4 100644 --- a/Kernel/drvutil.c +++ b/Kernel/drvutil.c @@ -236,18 +236,19 @@ int DrvUtil_Video_WriteLFB(tDrvUtil_Video_BufInfo *FBInfo, size_t Offset, size_t // Copy to Frambuffer if( FBInfo->Pitch != FBInfo->Width*4 ) { + Uint32 *px; // Pitch isn't 4*Width x = Offset % FBInfo->Width; y = Offset / FBInfo->Height; - dest = (Uint8*)FBInfo->Framebuffer + y*FBInfo->Pitch; + px = (Uint32*)FBInfo->Framebuffer + y*FBInfo->Pitch/4; for( ; Length >= 4; Length -= 4, x ) { - ((Uint32*)dest)[x++] = *src ++; + px[x++] = *src ++; if( x == FBInfo->Width ) { x = 0; - dest += FBInfo->Pitch; + px += FBInfo->Pitch; } } }