kdrive: update kdrive to new mi API with additional device argument. Includes
an update of ati_cursor.c and i810_cursor.c
This commit is contained in:
parent
c3eb248cf9
commit
c5b07fb717
|
@ -9,4 +9,4 @@ cd $srcdir
|
||||||
autoreconf -v --install || exit 1
|
autoreconf -v --install || exit 1
|
||||||
cd $ORIGDIR || exit $?
|
cd $ORIGDIR || exit $?
|
||||||
|
|
||||||
$srcdir/configure --enable-maintainer-mode --disable-dmx "$@"
|
$srcdir/configure --enable-maintainer-mode --disable-dmx --enable-kdrive "$@"
|
||||||
|
|
|
@ -28,9 +28,10 @@
|
||||||
#include "ati_reg.h"
|
#include "ati_reg.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
#include "ati_draw.h"
|
#include "ati_draw.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ATIMoveCursor(ScreenPtr pScreen, int x, int y)
|
ATIMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
ATICardInfo(pScreenPriv);
|
ATICardInfo(pScreenPriv);
|
||||||
|
@ -360,7 +361,7 @@ ATIUnloadCursor(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
ATIRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
ATIRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
ATICardInfo(pScreenPriv);
|
ATICardInfo(pScreenPriv);
|
||||||
|
@ -375,26 +376,26 @@ ATIRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
miPointerPosition(&x, &y);
|
miPointerGetPosition(pDev, &x, &y);
|
||||||
if (atic->is_radeon)
|
if (atic->is_radeon)
|
||||||
RadeonLoadCursor (pScreen);
|
RadeonLoadCursor (pScreen);
|
||||||
else
|
else
|
||||||
ClassicLoadCursor(pScreen);
|
ClassicLoadCursor(pScreen);
|
||||||
/* Move to new position */
|
/* Move to new position */
|
||||||
ATIMoveCursor(pScreen, x, y);
|
ATIMoveCursor(pDev, pScreen, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
ATIUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
ATIUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ATISetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
ATISetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
ATICardInfo(pScreenPriv);
|
ATICardInfo(pScreenPriv);
|
||||||
|
@ -413,7 +414,7 @@ ATISetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
||||||
else
|
else
|
||||||
ClassicLoadCursor(pScreen);
|
ClassicLoadCursor(pScreen);
|
||||||
/* Move to new position */
|
/* Move to new position */
|
||||||
ATIMoveCursor(pScreen, x, y);
|
ATIMoveCursor(pDev, pScreen, x, y);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ATIUnloadCursor(pScreen);
|
ATIUnloadCursor(pScreen);
|
||||||
|
@ -465,6 +466,7 @@ ATICursorSave(ScreenPtr pScreen, KdOffscreenArea *area)
|
||||||
void
|
void
|
||||||
ATICursorEnable(ScreenPtr pScreen)
|
ATICursorEnable(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
DeviceIntPtr pDev = inputInfo.pointer;
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
ATICardInfo(pScreenPriv);
|
ATICardInfo(pScreenPriv);
|
||||||
ATIScreenInfo(pScreenPriv);
|
ATIScreenInfo(pScreenPriv);
|
||||||
|
@ -489,13 +491,13 @@ ATICursorEnable(ScreenPtr pScreen)
|
||||||
if (pCurPriv->pCursor) {
|
if (pCurPriv->pCursor) {
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
miPointerPosition(&x, &y);
|
miPointerGetPosition(pDev, &x, &y);
|
||||||
if (atic->is_radeon)
|
if (atic->is_radeon)
|
||||||
RadeonLoadCursor(pScreen);
|
RadeonLoadCursor(pScreen);
|
||||||
else
|
else
|
||||||
ClassicLoadCursor(pScreen);
|
ClassicLoadCursor(pScreen);
|
||||||
/* Move to new position */
|
/* Move to new position */
|
||||||
ATIMoveCursor(pScreen, x, y);
|
ATIMoveCursor(pDev, pScreen, x, y);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ATIUnloadCursor(pScreen);
|
ATIUnloadCursor(pScreen);
|
||||||
|
|
|
@ -151,25 +151,25 @@ OsVendorInit (void)
|
||||||
/* 'Fake' cursor stuff, could be improved */
|
/* 'Fake' cursor stuff, could be improved */
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
ephyrRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
ephyrRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
ephyrUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
ephyrUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ephyrSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
ephyrSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ephyrMoveCursor(ScreenPtr pScreen, int x, int y)
|
ephyrMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "kxv.h"
|
#include "kxv.h"
|
||||||
#include "i810.h"
|
#include "i810.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
|
||||||
#define SetupCursor(s) KdScreenPriv(pScreen); \
|
#define SetupCursor(s) KdScreenPriv(pScreen); \
|
||||||
i810CardInfo(pScreenPriv); \
|
i810CardInfo(pScreenPriv); \
|
||||||
|
@ -129,7 +130,7 @@ _i810MoveCursor(ScreenPtr pScreen, int x, int y)
|
||||||
static void i810LoadCursor(ScreenPtr pScreen, int x, int y);
|
static void i810LoadCursor(ScreenPtr pScreen, int x, int y);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
i810MoveCursor (ScreenPtr pScreen, int x, int y)
|
i810MoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
i810ScreenInfo(pScreenPriv);
|
i810ScreenInfo(pScreenPriv);
|
||||||
|
@ -281,7 +282,7 @@ i810UnloadCursor(ScreenPtr pScreen)
|
||||||
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
i810RealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
i810ScreenInfo(pScreenPriv);
|
i810ScreenInfo(pScreenPriv);
|
||||||
|
@ -297,7 +298,7 @@ i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
miPointerPosition (&x, &y);
|
miPointerGetPosition (pDev, &x, &y);
|
||||||
i810LoadCursor (pScreen, x, y);
|
i810LoadCursor (pScreen, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,13 +306,13 @@ i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
i810UnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
i810UnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
i810SetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
i810ScreenInfo(pScreenPriv);
|
i810ScreenInfo(pScreenPriv);
|
||||||
|
|
|
@ -2219,11 +2219,11 @@ KdCrossScreen(ScreenPtr pScreen, Bool entering)
|
||||||
int KdCurScreen; /* current event screen */
|
int KdCurScreen; /* current event screen */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
KdWarpCursor (ScreenPtr pScreen, int x, int y)
|
KdWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
KdBlockSigio ();
|
KdBlockSigio ();
|
||||||
KdCurScreen = pScreen->myNum;
|
KdCurScreen = pScreen->myNum;
|
||||||
miPointerWarpCursor (pScreen, x, y);
|
miPointerWarpCursor(pDev, pScreen, x, y);
|
||||||
KdUnblockSigio ();
|
KdUnblockSigio ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2238,7 +2238,7 @@ void
|
||||||
ProcessInputEvents ()
|
ProcessInputEvents ()
|
||||||
{
|
{
|
||||||
mieqProcessInputEvents();
|
mieqProcessInputEvents();
|
||||||
miPointerUpdate();
|
miPointerUpdateSprite(inputInfo.pointer);
|
||||||
if (kdSwitchPending)
|
if (kdSwitchPending)
|
||||||
KdProcessSwitch ();
|
KdProcessSwitch ();
|
||||||
KdCheckLock ();
|
KdCheckLock ();
|
||||||
|
|
Loading…
Reference in New Issue