diff options
-rw-r--r-- | src/amd_gx_randr.c | 7 | ||||
-rw-r--r-- | src/amd_lx_randr.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/amd_gx_randr.c b/src/amd_gx_randr.c index 1034939..cdcd635 100644 --- a/src/amd_gx_randr.c +++ b/src/amd_gx_randr.c @@ -54,7 +54,8 @@ typedef struct _GXRandRInfo Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) +#if AMD_OLDPRIV static DevPrivateKey GXRandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ @@ -310,7 +311,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation) GXRandRGeneration = serverGeneration; } -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV GXRandRIndex = AllocateScreenPrivateIndex(); #else GXRandRKey = &GXRandRKey; @@ -339,7 +340,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation) pRandr->supported_rotations = rotation; pRandr->maxX = pRandr->maxY = 0; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV dixSetPrivate(&pScreen->devPrivates, GXRandRKey, pRandr); #else pScreen->devPrivates[GXRandRIndex].ptr = pRandr; diff --git a/src/amd_lx_randr.c b/src/amd_lx_randr.c index 19880bb..f411de0 100644 --- a/src/amd_lx_randr.c +++ b/src/amd_lx_randr.c @@ -54,7 +54,8 @@ typedef struct _LXRandRInfo Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) +#if AMD_OLDPRIV static DevPrivateKey LXRandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ @@ -310,7 +311,7 @@ LXRandRInit(ScreenPtr pScreen, int rotation) LXRandRGeneration = serverGeneration; } -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV LXRandRIndex = AllocateScreenPrivateIndex(); #else LXRandRKey = &LXRandRKey; @@ -339,7 +340,7 @@ LXRandRInit(ScreenPtr pScreen, int rotation) pRandr->supported_rotations = rotation; pRandr->maxX = pRandr->maxY = 0; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV dixSetPrivate(&pScreen->devPrivates, LXRandRKey, pRandr); #else pScreen->devPrivates[LXRandRIndex].ptr = pRandr; |