diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-13 16:29:11 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-13 16:30:51 +0000 |
commit | b7feeca0730bf55c23e5bc5af4cae9b8a73bba0e (patch) | |
tree | 371a013d76f8d7610a784c0904c7a44e3ccd90d4 /src/compat-api.h | |
parent | 3cfde9f04362a858ddfe7990109147e32eed516c (diff) |
sna: Wrap direct access to ScrnInfoPtr->pScreen
Admittedly ScrnInfoPtr->pScreen has nearly always existed, but for
completeness wrap it up in a compat macro.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/compat-api.h')
-rw-r--r-- | src/compat-api.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compat-api.h b/src/compat-api.h index 9367d646..c9c76eb4 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -39,7 +39,13 @@ #ifndef XF86_HAS_SCRN_CONV #define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,1,0,0,0) #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] +#else +#define xf86ScrnToScreen(s) ((s)->pScreen) +#endif +#else +#define xf86ScrnToScreen(s) ((s)->pScreen) #endif #ifndef XF86_SCRN_INTERFACE |