Fix compiler warning on Mac OS X, when targeting old OS with new SDK. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Fri, 04 Nov 2011 00:56:11 -0400
branchSDL-1.2
changeset 60494b79fd1fd9a3
parent 6048 a0538c8c39b5
child 6050 e77741114d13
Fix compiler warning on Mac OS X, when targeting old OS with new SDK.
src/video/quartz/SDL_QuartzVideo.m
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Thu Nov 03 23:58:24 2011 -0400
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Fri Nov 04 00:56:11 2011 -0400
     1.3 @@ -24,6 +24,18 @@
     1.4  #include "SDL_QuartzVideo.h"
     1.5  #include "SDL_QuartzWindow.h"
     1.6  
     1.7 +/* These APIs aren't just deprecated; they're gone from the headers in the
     1.8 +   10.7 SDK. If we're using a >= 10.7 SDK, but targeting < 10.7, then we
     1.9 +   force these function declarations. */
    1.10 +#if ((MAC_OS_X_VERSION_MIN_REQUIRED < 1070) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070))
    1.11 +CG_EXTERN void *CGDisplayBaseAddress(CGDirectDisplayID display)
    1.12 +  CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6,
    1.13 +    __IPHONE_NA, __IPHONE_NA);
    1.14 +CG_EXTERN size_t CGDisplayBytesPerRow(CGDirectDisplayID display)
    1.15 +  CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6,
    1.16 +    __IPHONE_NA, __IPHONE_NA);
    1.17 +#endif
    1.18 +
    1.19  #if (MAC_OS_X_VERSION_MIN_REQUIRED < 1060)  /* Fixed in Snow Leopard */
    1.20  /*
    1.21      Add methods to get at private members of NSScreen.