Skip to content
Snippets Groups Projects
Commit d46f6e07 authored by John Hodge's avatar John Hodge
Browse files

Modules/BochsGA - Added DrvUtil cursor support

parent bd1ddb7b
No related merge requests found
...@@ -193,14 +193,29 @@ int BGA_IOCtl(tVFS_Node *Node, int ID, void *Data) ...@@ -193,14 +193,29 @@ int BGA_IOCtl(tVFS_Node *Node, int ID, void *Data)
break; break;
case VIDEO_IOCTL_SETBUFFORMAT: case VIDEO_IOCTL_SETBUFFORMAT:
DrvUtil_Video_RemoveCursor( &gBGA_DrvUtil_BufInfo );
ret = gBGA_DrvUtil_BufInfo.BufferFormat; ret = gBGA_DrvUtil_BufInfo.BufferFormat;
if(Data) if(Data)
gBGA_DrvUtil_BufInfo.BufferFormat = *(int*)Data; gBGA_DrvUtil_BufInfo.BufferFormat = *(int*)Data;
if(gBGA_DrvUtil_BufInfo.BufferFormat == VIDEO_BUFFMT_TEXT)
DrvUtil_Video_SetCursor( &gBGA_DrvUtil_BufInfo, &gDrvUtil_TextModeCursor );
break; break;
case VIDEO_IOCTL_SETCURSOR: case VIDEO_IOCTL_SETCURSOR:
DrvUtil_Video_RemoveCursor( &gBGA_DrvUtil_BufInfo );
gBGA_CursorPos.x = ((tVideo_IOCtl_Pos*)Data)->x; gBGA_CursorPos.x = ((tVideo_IOCtl_Pos*)Data)->x;
gBGA_CursorPos.y = ((tVideo_IOCtl_Pos*)Data)->y; 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; break;
default: default:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment