diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-06-22 08:30:52 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-22 08:30:52 -0700 |
commit | 14b1561dac796c6ad05648e6857028a87acde9ef (patch) | |
tree | ce200e707deffb1839009e3369eaa783e5027534 /src | |
parent | b47d77360cb428d8892beb93789c83dfa681b26f (diff) |
Adapt to DevPrivate API changes.
This allows the driver to be built against either the old or new
DevPrivate API.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/gx_randr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gx_randr.c b/src/gx_randr.c index aa8b995..5a0b9f5 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -55,7 +55,11 @@ typedef struct _GXRandRInfo Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; +#if HAS_DEVPRIVATEKEYREC +static DevPrivateKeyRec GXRandRIndex; +#else static int GXRandRIndex; +#endif #define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) @@ -331,6 +335,10 @@ GXRandRInit(ScreenPtr pScreen, int rotation) #if OLD_VIDEODRV_INTERFACE GXRandRIndex = AllocateScreenPrivateIndex(); #endif +#if HAS_DIXREGISTERPRIVATEKEY + if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0)) + return FALSE; +#endif pRandr = xcalloc(sizeof(XF86RandRInfoRec), 1); if (pRandr == NULL) |