summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-27 13:43:42 +1000
committerDave Airlie <airlied@redhat.com>2008-02-27 13:43:42 +1000
commit06ba97efddc13581f6d10de6a21cc7b48fbf283f (patch)
treef577626c50ecb233cffa13bd8a11e0f7c3476883
parent0c6c41b7b772f75cffbf189c8a84fa04b089fa71 (diff)
tga: fixup devPrivates
-rw-r--r--src/tga.h1
-rw-r--r--src/tga_line.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/tga.h b/src/tga.h
index 59f9d1a..9427914 100644
--- a/src/tga.h
+++ b/src/tga.h
@@ -34,6 +34,7 @@ typedef struct {
unsigned long tgaRegs[0x100];
} TGARegRec, *TGARegPtr;
+#define TGA_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
#define TGAPTR(p) ((TGAPtr)((p)->driverPrivate))
diff --git a/src/tga_line.c b/src/tga_line.c
index c8b3649..5625c31 100644
--- a/src/tga_line.c
+++ b/src/tga_line.c
@@ -416,7 +416,11 @@ TGAPolySegment(
#endif
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
+#if TGA_OLDPRIV
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
+#else
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey());
+#endif
BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip);
int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip);
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);