// 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;
}
}
}
}
}
}
+ else if(W == FBInfo->Width && FBInfo->Pitch == FBInfo->Width*bytes_per_px) {
+ memmove((Uint8*)FBInfo->Framebuffer + dst, (Uint8*)FBInfo->Framebuffer + src, H*FBInfo->Pitch);
+ }
else {
// Normal copy is OK
while( H -- ) {