1#ifdef HAVE_CONFIG_H 2#include "config.h" 3#endif 4 5#include "xf86.h" 6#include "xf86_OSproc.h" 7 8#include "xf86Pci.h" 9 10#include "mga.h" 11#include "mga_reg.h" 12 13Bool 14MGAHWCursorInit(ScreenPtr pScreen) 15{ 16 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); 17 MGAPtr pMga = MGAPTR(pScrn); 18 MGARamdacPtr MGAdac = &pMga->Dac; 19 xf86CursorInfoPtr infoPtr; 20 21 if (!MGAdac->isHwCursor) 22 return FALSE; 23 24 infoPtr = xf86CreateCursorInfoRec(); 25 if(!infoPtr) return FALSE; 26 27 pMga->CursorInfoRec = infoPtr; 28 29 infoPtr->MaxWidth = MGAdac->CursorMaxWidth; 30 infoPtr->MaxHeight = MGAdac->CursorMaxHeight; 31 infoPtr->Flags = MGAdac->CursorFlags; 32 infoPtr->SetCursorColors = MGAdac->SetCursorColors; 33 infoPtr->SetCursorPosition = MGAdac->SetCursorPosition; 34 infoPtr->LoadCursorImage = MGAdac->LoadCursorImage; 35 infoPtr->HideCursor = MGAdac->HideCursor; 36 infoPtr->ShowCursor = MGAdac->ShowCursor; 37 infoPtr->UseHWCursor = MGAdac->UseHWCursor; 38 39 return(xf86InitCursor(pScreen, infoPtr)); 40} 41