diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:55 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:55 +0000 |
commit | 1e444800e5935c1c5678aaa9fa3751c4519f42e4 (patch) | |
tree | c52149949dfe70e8096392a9a1bd93ef99423c73 /src/mga_hwcurs.c |
Initial revisionXORG-STABLE
Diffstat (limited to 'src/mga_hwcurs.c')
-rw-r--r-- | src/mga_hwcurs.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/mga_hwcurs.c b/src/mga_hwcurs.c new file mode 100644 index 0000000..8b4e66b --- /dev/null +++ b/src/mga_hwcurs.c @@ -0,0 +1,41 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_hwcurs.c,v 1.9 1999/03/14 03:22:00 dawes Exp $ */ + +#include "xf86.h" +#include "xf86_OSproc.h" +#include "xf86_ansic.h" + +#include "xf86Pci.h" +#include "xf86PciInfo.h" + +#include "mga_bios.h" +#include "mga.h" +#include "mga_reg.h" + +Bool +MGAHWCursorInit(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + MGAPtr pMga = MGAPTR(pScrn); + MGARamdacPtr MGAdac = &pMga->Dac; + xf86CursorInfoPtr infoPtr; + + if (!MGAdac->isHwCursor) + return FALSE; + + infoPtr = xf86CreateCursorInfoRec(); + if(!infoPtr) return FALSE; + + pMga->CursorInfoRec = infoPtr; + + infoPtr->MaxWidth = MGAdac->CursorMaxWidth; + infoPtr->MaxHeight = MGAdac->CursorMaxHeight; + infoPtr->Flags = MGAdac->CursorFlags; + infoPtr->SetCursorColors = MGAdac->SetCursorColors; + infoPtr->SetCursorPosition = MGAdac->SetCursorPosition; + infoPtr->LoadCursorImage = MGAdac->LoadCursorImage; + infoPtr->HideCursor = MGAdac->HideCursor; + infoPtr->ShowCursor = MGAdac->ShowCursor; + infoPtr->UseHWCursor = MGAdac->UseHWCursor; + + return(xf86InitCursor(pScreen, infoPtr)); +} |