Modules/VESA - Hide cursor when not LFB mode
authorJohn Hodge <[email protected]>
Wed, 25 Dec 2013 00:47:52 +0000 (08:47 +0800)
committerJohn Hodge <[email protected]>
Wed, 25 Dec 2013 00:47:52 +0000 (08:47 +0800)
KernelLand/Modules/Display/VESA/main.c

index 25616da..51c80e1 100644 (file)
@@ -363,7 +363,8 @@ int Vesa_IOCtl(tVFS_Node *Node, int ID, void *Data)
                return 0;\r
        \r
        case VIDEO_IOCTL_SETCURSORBITMAP:\r
-               DrvUtil_Video_SetCursor( &gVesa_BufInfo, Data );\r
+               if( gpVesaCurMode->flags & FLAG_LFB )\r
+                       DrvUtil_Video_SetCursor( &gVesa_BufInfo, Data );\r
                return 0;\r
        }\r
        return 0;\r
@@ -551,9 +552,9 @@ int Vesa_Int_ModeInfo(tVideo_IOCtl_Mode *data)
 \r
 void Vesa_int_HideCursor(void)\r
 {\r
+       DrvUtil_Video_RemoveCursor( &gVesa_BufInfo );\r
        if( gpVesaCurMode->flags & FLAG_LFB )\r
        {\r
-               DrvUtil_Video_RemoveCursor( &gVesa_BufInfo );\r
                #if BLINKING_CURSOR\r
                if(gpVesaCursorTimer) {\r
                        Time_RemoveTimer(gpVesaCursorTimer);\r
@@ -585,6 +586,10 @@ void Vesa_int_ShowCursor(void)
                                giVesaCursorY\r
                                );\r
        }\r
+       else\r
+       {\r
+               DrvUtil_Video_RemoveCursor( &gVesa_BufInfo );\r
+       }\r
 }\r
 \r
 /**\r

UCC git Repository :: git.ucc.asn.au