Kernel/DrvUtil - Fixed compile error on ARMv7
authorJohn Hodge <[email protected]>
Sun, 23 Oct 2011 13:45:08 +0000 (21:45 +0800)
committerJohn Hodge <[email protected]>
Sun, 23 Oct 2011 13:45:08 +0000 (21:45 +0800)
Kernel/drvutil.c

index 41df604..9d1590b 100644 (file)
@@ -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;
                                        }
                                }
                        }

UCC git Repository :: git.ucc.asn.au