X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fdrv%2Fvterm.c;h=d01062536ecea650df1be4bf0fffa4cc39a45904;hb=89fba51f2433cf185831ee70554b99fe87e44a9d;hp=b73e8dea1e466efba7990e69b9668c84b3cb9d52;hpb=85eb17b306404571aa39596946c87ad9bb1d9d13;p=tpg%2Facess2.git diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index b73e8dea..d0106253 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -390,26 +390,36 @@ Uint64 VT_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) { if( giVT_RealWidth > term->Width || giVT_RealHeight > term->Height ) { - #if 0 - int x, y, h; + int x, y, w, h; x = Offset/4; y = x / term->Width; x %= term->Width; w = Length/4+x; h = w / term->Width; w %= term->Width; + // Center + x += (giVT_RealWidth - term->Width) / 2; + y += (giVT_RealHeight - term->Height) / 2; while(h--) { VFS_WriteAt( giVT_OutputDevHandle, - (x+y*term->RealWidth)*4, + (x + y * giVT_RealWidth)*4, term->Width * 4, Buffer ); - Buffer = (void*)( (Uint)Buffer + term->Width*term->Height*4 ); + Buffer = (void*)( (Uint)Buffer + term->Width*4 ); + y ++; } - #endif return 0; } else { return VFS_WriteAt( giVT_OutputDevHandle, Offset, Length, Buffer ); } } + + case TERM_MODE_2DACCEL: + //case TERM_MODE_3DACCEL: + if( Node->Inode == giVT_CurrentTerminal ) + { + VFS_Write( giVT_OutputDevHandle, Length, Buffer ); + } + break; } return 0;