From: John Hodge Date: Tue, 31 Jul 2012 03:20:11 +0000 (+0800) Subject: Kernel - Fixed screen not updating in VT framebuffer mode X-Git-Tag: rel0.15~706^2~92 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=93a6bfbef3c85c3449826d1fbdc9aa08faa1dc20;p=tpg%2Facess2.git Kernel - Fixed screen not updating in VT framebuffer mode --- diff --git a/KernelLand/Kernel/drvutil_video.c b/KernelLand/Kernel/drvutil_video.c index 05fa1026..2bee791f 100644 --- a/KernelLand/Kernel/drvutil_video.c +++ b/KernelLand/Kernel/drvutil_video.c @@ -265,12 +265,16 @@ int DrvUtil_Video_WriteLFB(tDrvUtil_Video_BufInfo *FBInfo, size_t Offset, size_t px = (void*)dest; } } + if( x > 0 ) { + dest += FBInfo->Pitch; + } } else { ofs = Offset; dest += ofs; memcpy(dest, Buffer, Length); + dest += Length; } break; default: @@ -293,9 +297,11 @@ int DrvUtil_Video_WriteLFB(tDrvUtil_Video_BufInfo *FBInfo, size_t Offset, size_t return -1; } if( FBInfo->BackBuffer && dest ) { - memcpy((char*)FBInfo->Framebuffer + ofs, (char*)FBInfo->BackBuffer + ofs, - ((tVAddr)dest - (tVAddr)FBInfo->BackBuffer) - ofs - ); + void *_dst = (char*)FBInfo->Framebuffer + ofs; + void *_src = (char*)FBInfo->BackBuffer + ofs; + size_t len = ((tVAddr)dest - (tVAddr)FBInfo->BackBuffer) - ofs; + // Log_Debug("DrvUtil", "Copy from BB %p to FB %p 0x%x bytes", _src, _dst, len); + memcpy(_dst, _src, len); } DrvUtil_Video_DrawCursor(FBInfo, csr_x, csr_y);