diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c index b3b315c59..e46e90405 100644 --- a/hw/xquartz/quartzRandR.c +++ b/hw/xquartz/quartzRandR.c @@ -1,9 +1,9 @@ /* - * * Quartz-specific support for the XRandR extension * * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons, * 2010 Jan Hauffa. + * 2010 Apple Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -39,6 +39,8 @@ #include "quartzRandR.h" #include "quartz.h" +#include + #include #include #include @@ -51,7 +53,7 @@ typedef Bool (*QuartzModeCallback) (ScreenPtr, CGDirectDisplayID, QuartzModeInfoPtr, void *); -#if defined(USE_DEPRECATED_CG_API) +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 static long getDictLong (CFDictionaryRef dictRef, CFStringRef key) { long value; @@ -140,7 +142,7 @@ static Bool QuartzRandREnumerateModes (ScreenPtr pScreen, return TRUE; } -#else /* defined(USE_DEPRECATED_CG_API) */ +#else /* we have the new CG APIs from Snow Leopard */ static void QuartzRandRGetModeInfo (CGDisplayModeRef modeRef, QuartzModeInfoPtr pMode) { @@ -220,7 +222,7 @@ static Bool QuartzRandREnumerateModes (ScreenPtr pScreen, return TRUE; } -#endif /* defined(USE_DEPRECATED_CG_API) */ +#endif /* Snow Leopard CoreGraphics APIs */ static Bool QuartzRandRModesEqual (QuartzModeInfoPtr pMode1, diff --git a/hw/xquartz/quartzRandR.h b/hw/xquartz/quartzRandR.h index 711c3f3f3..d57dc3bf8 100644 --- a/hw/xquartz/quartzRandR.h +++ b/hw/xquartz/quartzRandR.h @@ -2,6 +2,7 @@ * quartzRandR.h * * Copyright (c) 2010 Jan Hauffa. + * 2010 Apple Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -27,6 +28,9 @@ * use or other dealings in this Software without prior written authorization. */ -#define USE_DEPRECATED_CG_API 1 +#ifndef _QUARTZRANDR_H_ +#define _QUARTZRANDR_H_ Bool QuartzRandRInit (ScreenPtr pScreen); + +#endif