From 8b97dbc771092faaa492e244abff0978de74480b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 4 Nov 2011 00:56:11 -0400 Subject: [PATCH] Fix compiler warning on Mac OS X, when targeting old OS with new SDK. --HG-- branch : SDL-1.2 --- src/video/quartz/SDL_QuartzVideo.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index ba22e9f6c..2f8985741 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -24,6 +24,18 @@ #include "SDL_QuartzVideo.h" #include "SDL_QuartzWindow.h" +/* These APIs aren't just deprecated; they're gone from the headers in the + 10.7 SDK. If we're using a >= 10.7 SDK, but targeting < 10.7, then we + force these function declarations. */ +#if ((MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)) +CG_EXTERN void *CGDisplayBaseAddress(CGDirectDisplayID display) + CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, + __IPHONE_NA, __IPHONE_NA); +CG_EXTERN size_t CGDisplayBytesPerRow(CGDirectDisplayID display) + CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, + __IPHONE_NA, __IPHONE_NA); +#endif + #if (MAC_OS_X_VERSION_MIN_REQUIRED < 1060) /* Fixed in Snow Leopard */ /* Add methods to get at private members of NSScreen.