git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Light fixes to build bugs
[tpg/acess2.git]
/
Kernel
/
drvutil.c
diff --git
a/Kernel/drvutil.c
b/Kernel/drvutil.c
index
41df604
..
00ab5ce
100644
(file)
--- 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 )
{
// Copy to Frambuffer
if( FBInfo->Pitch != FBInfo->Width*4 )
{
+ Uint32 *px;
// Pitch isn't 4*Width
x = Offset % FBInfo->Width;
y = Offset / FBInfo->Height;
// 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 )
{
for( ; Length >= 4; Length -= 4, x )
{
-
((Uint32*)dest)
[x++] = *src ++;
+
px
[x++] = *src ++;
if( x == FBInfo->Width ) {
x = 0;
if( x == FBInfo->Width ) {
x = 0;
-
dest
+= FBInfo->Pitch;
+
px
+= FBInfo->Pitch;
}
}
}
}
}
}
@@
-538,6
+539,9
@@
void DrvUtil_Video_2D_Blit(void *Ent, Uint16 DstX, Uint16 DstY, Uint16 SrcX, Uin
}
}
}
}
}
}
+ 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 -- ) {
else {
// Normal copy is OK
while( H -- ) {
UCC
git Repository :: git.ucc.asn.au