From: John Hodge Date: Sat, 22 Oct 2011 07:20:29 +0000 (+0800) Subject: Modules/BochsGA - Added DrvUtil cursor support X-Git-Tag: rel0.13~7 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d46f6e07108d7bba832a25398f3103f77ee0c5ef;p=tpg%2Facess2.git Modules/BochsGA - Added DrvUtil cursor support --- diff --git a/Modules/Display/BochsGA/bochsvbe.c b/Modules/Display/BochsGA/bochsvbe.c index d9aada91..86ba2a2a 100644 --- a/Modules/Display/BochsGA/bochsvbe.c +++ b/Modules/Display/BochsGA/bochsvbe.c @@ -193,14 +193,29 @@ int BGA_IOCtl(tVFS_Node *Node, int ID, void *Data) break; case VIDEO_IOCTL_SETBUFFORMAT: + DrvUtil_Video_RemoveCursor( &gBGA_DrvUtil_BufInfo ); ret = gBGA_DrvUtil_BufInfo.BufferFormat; if(Data) gBGA_DrvUtil_BufInfo.BufferFormat = *(int*)Data; + if(gBGA_DrvUtil_BufInfo.BufferFormat == VIDEO_BUFFMT_TEXT) + DrvUtil_Video_SetCursor( &gBGA_DrvUtil_BufInfo, &gDrvUtil_TextModeCursor ); break; case VIDEO_IOCTL_SETCURSOR: + DrvUtil_Video_RemoveCursor( &gBGA_DrvUtil_BufInfo ); gBGA_CursorPos.x = ((tVideo_IOCtl_Pos*)Data)->x; gBGA_CursorPos.y = ((tVideo_IOCtl_Pos*)Data)->y; + if(gBGA_DrvUtil_BufInfo.BufferFormat == VIDEO_BUFFMT_TEXT) + DrvUtil_Video_DrawCursor( + &gBGA_DrvUtil_BufInfo, + gBGA_CursorPos.x*giVT_CharWidth, + gBGA_CursorPos.y*giVT_CharHeight + ); + else + DrvUtil_Video_DrawCursor( + &gBGA_DrvUtil_BufInfo, + gBGA_CursorPos.x, gBGA_CursorPos.y + ); break; default: