diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2006-10-29 03:55:39 +0200 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2007-02-05 19:32:04 +0200 |
commit | 4dac7896549392f7378cad9620618cec28f41a16 (patch) | |
tree | 1750d279bed14625b40b4b4f2fb563409c8e149c /src/atimach64cursor.c | |
parent | 23b12b9ff55224e8c3c45eb58ea5fbf2f747d82e (diff) |
Consolidate aticursor.c w/ atimach64cursor.c
Diffstat (limited to 'src/atimach64cursor.c')
-rw-r--r-- | src/atimach64cursor.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/atimach64cursor.c b/src/atimach64cursor.c index be8ea11..a3488bb 100644 --- a/src/atimach64cursor.c +++ b/src/atimach64cursor.c @@ -25,8 +25,8 @@ #endif #include "ati.h" +#include "aticursor.h" #include "atimach64accel.h" -#include "atimach64cursor.h" #include "atimach64io.h" /* @@ -364,9 +364,26 @@ ATIMach64UseHWCursor Bool ATIMach64CursorInit ( - xf86CursorInfoPtr pCursorInfo + ScreenPtr pScreen ) { + ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum]; + ATIPtr pATI = ATIPTR(pScreenInfo); + xf86CursorInfoPtr pCursorInfo; + + /* Initialise software cursor */ + if (!miDCInitialize(pScreen, xf86GetPointerScreenFuncs())) + return FALSE; + + if (pATI->Cursor == ATI_CURSOR_SOFTWARE) + return TRUE; + + /* Initialise hardware cursor */ + if (!(pATI->pCursorInfo = xf86CreateCursorInfoRec())) + return FALSE; + + pCursorInfo = pATI->pCursorInfo; + /* * For Mach64 variants, toggling hardware cursors off and on causes display * artifacts. Ask the cursor support layers to always paint the cursor @@ -397,5 +414,13 @@ ATIMach64CursorInit pCursorInfo->ShowCursor = ATIMach64ShowCursor; pCursorInfo->UseHWCursor = ATIMach64UseHWCursor; + if (!xf86InitCursor(pScreen, pATI->pCursorInfo)) + { + xf86DestroyCursorInfoRec(pATI->pCursorInfo); + pATI->pCursorInfo = NULL; + return FALSE; + } + + xf86SetSilkenMouse(pScreen); return TRUE; } |