summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am3
-rw-r--r--src/aticursor.c71
-rw-r--r--src/aticursor.h2
-rw-r--r--src/atimach64cursor.c29
-rw-r--r--src/atimach64cursor.h30
-rw-r--r--src/atiscreen.c2
6 files changed, 30 insertions, 107 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index adb87073..a386c619 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,7 +61,7 @@ atimisc_drv_la_LDFLAGS = -module -avoid-version
atimisc_drv_ladir = @moduledir@/drivers
atimisc_drv_la_SOURCES = \
atiadjust.c atiaudio.c aticlock.c aticonfig.c aticonsole.c \
- aticursor.c atidac.c atidecoder.c atidsp.c atifillin.c atii2c.c \
+ atidac.c atidecoder.c atidsp.c atifillin.c atii2c.c \
atilock.c atimach64.c atimach64accel.c atimach64cursor.c \
atimach64i2c.c atimach64io.c atimach64xv.c atimode.c atipreinit.c \
atiprint.c atirgb514.c atiscreen.c atituner.c atiutil.c ativalid.c \
@@ -131,7 +131,6 @@ EXTRA_DIST = \
atiload.h \
atilock.h \
atimach64accel.h \
- atimach64cursor.h \
atimach64.h \
atimach64i2c.h \
atimach64io.h \
diff --git a/src/aticursor.c b/src/aticursor.c
deleted file mode 100644
index e2da78cb..00000000
--- a/src/aticursor.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2001 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of Marc Aurele La France not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Marc Aurele La France makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as-is" without express or implied warranty.
- *
- * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "aticursor.h"
-#include "atimach64cursor.h"
-#include "atistruct.h"
-
-#include "xf86.h"
-
-/*
- * ATIInitializeCursor --
- *
- * This function initialises the screen cursor.
- */
-Bool
-ATIInitializeCursor
-(
- ScreenPtr pScreen,
- ATIPtr pATI
-)
-{
- /* Initialise software cursor */
- if (!miDCInitialize(pScreen, xf86GetPointerScreenFuncs()))
- return FALSE;
-
- if (pATI->Cursor == ATI_CURSOR_SOFTWARE)
- return TRUE;
-
- if (!(pATI->pCursorInfo = xf86CreateCursorInfoRec()))
- return FALSE;
-
- if (!ATIMach64CursorInit(pATI->pCursorInfo))
- {
- xf86DestroyCursorInfoRec(pATI->pCursorInfo);
- pATI->pCursorInfo = NULL;
- return FALSE;
- }
-
- if (xf86InitCursor(pScreen, pATI->pCursorInfo))
- {
- xf86SetSilkenMouse(pScreen);
- return TRUE;
- }
-
- xf86DestroyCursorInfoRec(pATI->pCursorInfo);
- pATI->pCursorInfo = NULL;
- return FALSE;
-}
diff --git a/src/aticursor.h b/src/aticursor.h
index e38b589d..75bd44c6 100644
--- a/src/aticursor.h
+++ b/src/aticursor.h
@@ -37,6 +37,6 @@ typedef enum
ATI_CURSOR_DAC /* Hardware cursor provided by RAMDAC */
} ATICursorType;
-extern Bool ATIInitializeCursor(ScreenPtr, ATIPtr);
+extern Bool ATIMach64CursorInit(ScreenPtr);
#endif /* ___ATICURSOR_H___ */
diff --git a/src/atimach64cursor.c b/src/atimach64cursor.c
index be8ea111..a3488bb1 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;
}
diff --git a/src/atimach64cursor.h b/src/atimach64cursor.h
deleted file mode 100644
index 767c6a42..00000000
--- a/src/atimach64cursor.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2003 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of Marc Aurele La France not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Marc Aurele La France makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as-is" without express or implied warranty.
- *
- * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef ___ATIMACH64CURSOR_H___
-#define ___ATIMACH64CURSOR_H___ 1
-
-#include "xf86Cursor.h"
-
-extern Bool ATIMach64CursorInit(xf86CursorInfoPtr);
-
-#endif /* ___ATIMACH64CURSOR_H___ */
diff --git a/src/atiscreen.c b/src/atiscreen.c
index 338342ac..58b0bdaa 100644
--- a/src/atiscreen.c
+++ b/src/atiscreen.c
@@ -554,7 +554,7 @@ ATIScreenInit
xf86SetBackingStore(pScreen);
/* Initialise cursor */
- if (!ATIInitializeCursor(pScreen, pATI))
+ if (!ATIMach64CursorInit(pScreen))
return FALSE;
/* Create default colourmap */