Removed the MAC_OS_X_VERSION_10_x macros from the 1.3 branch.
1.1 --- a/include/SDL_platform.h Tue Aug 23 16:47:22 2011 -0400
1.2 +++ b/include/SDL_platform.h Thu Aug 25 03:11:28 2011 -0400
1.3 @@ -74,15 +74,6 @@
1.4 /* lets us know what version of Mac OS X we're compiling on */
1.5 #include "AvailabilityMacros.h"
1.6 #include "TargetConditionals.h"
1.7 -#ifndef MAC_OS_X_VERSION_10_4
1.8 -#define MAC_OS_X_VERSION_10_4 1040
1.9 -#endif
1.10 -#ifndef MAC_OS_X_VERSION_10_5
1.11 -#define MAC_OS_X_VERSION_10_5 1050
1.12 -#endif
1.13 -#ifndef MAC_OS_X_VERSION_10_6
1.14 -#define MAC_OS_X_VERSION_10_6 1060
1.15 -#endif
1.16 #if TARGET_OS_IPHONE
1.17 /* if compiling for iPhone */
1.18 #undef __IPHONEOS__
2.1 --- a/src/audio/coreaudio/SDL_coreaudio.h Tue Aug 23 16:47:22 2011 -0400
2.2 +++ b/src/audio/coreaudio/SDL_coreaudio.h Thu Aug 25 03:11:28 2011 -0400
2.3 @@ -32,7 +32,7 @@
2.4 #if MACOSX_COREAUDIO
2.5 #include <CoreAudio/CoreAudio.h>
2.6 #include <CoreServices/CoreServices.h>
2.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
2.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050
2.9 #include <AudioUnit/AUNTComponent.h>
2.10 #endif
2.11 #endif
3.1 --- a/src/video/cocoa/SDL_cocoaclipboard.m Tue Aug 23 16:47:22 2011 -0400
3.2 +++ b/src/video/cocoa/SDL_cocoaclipboard.m Thu Aug 25 03:11:28 2011 -0400
3.3 @@ -26,7 +26,7 @@
3.4 static NSString *
3.5 GetTextFormat(_THIS)
3.6 {
3.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
3.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
3.9 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
3.10
3.11 if (data->osversion >= 0x1060) {
4.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m Tue Aug 23 16:47:22 2011 -0400
4.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m Thu Aug 25 03:11:28 2011 -0400
4.3 @@ -170,7 +170,7 @@
4.4 }
4.5
4.6 /* Needs long instead of NSInteger for compilation on Mac OS X 10.4 */
4.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
4.8 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
4.9 - (long) conversationIdentifier
4.10 #else
4.11 - (NSInteger) conversationIdentifier
4.12 @@ -481,7 +481,7 @@
4.13 static void
4.14 UpdateKeymap(SDL_VideoData *data)
4.15 {
4.16 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
4.17 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
4.18 TISInputSourceRef key_layout;
4.19 #else
4.20 KeyboardLayoutRef key_layout;
4.21 @@ -492,7 +492,7 @@
4.22 SDL_Keycode keymap[SDL_NUM_SCANCODES];
4.23
4.24 /* See if the keymap needs to be updated */
4.25 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
4.26 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
4.27 key_layout = TISCopyCurrentKeyboardLayoutInputSource();
4.28 #else
4.29 KLGetCurrentKeyboardLayout(&key_layout);
4.30 @@ -505,7 +505,7 @@
4.31 SDL_GetDefaultKeymap(keymap);
4.32
4.33 /* Try Unicode data first (preferred as of Mac OS X 10.5) */
4.34 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
4.35 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
4.36 CFDataRef uchrDataRef = TISGetInputSourceProperty(key_layout, kTISPropertyUnicodeKeyLayoutData);
4.37 if (uchrDataRef)
4.38 chr_data = CFDataGetBytePtr(uchrDataRef);
4.39 @@ -547,7 +547,7 @@
4.40 return;
4.41 }
4.42
4.43 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
4.44 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
4.45 cleanup:
4.46 CFRelease(key_layout);
4.47 #else
5.1 --- a/src/video/cocoa/SDL_cocoamodes.m Tue Aug 23 16:47:22 2011 -0400
5.2 +++ b/src/video/cocoa/SDL_cocoamodes.m Thu Aug 25 03:11:28 2011 -0400
5.3 @@ -27,10 +27,10 @@
5.4
5.5 #if FORCE_OLD_API
5.6 #undef MAC_OS_X_VERSION_MIN_REQUIRED
5.7 -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5
5.8 +#define MAC_OS_X_VERSION_MIN_REQUIRED 1050
5.9 #endif
5.10
5.11 -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
5.12 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
5.13 /*
5.14 Add methods to get at private members of NSScreen.
5.15 Since there is a bug in Apple's screen switching code
5.16 @@ -122,7 +122,7 @@
5.17 }
5.18 data->moderef = moderef;
5.19
5.20 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.21 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.22 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.23 CGDisplayModeRef vidmode = (CGDisplayModeRef) moderef;
5.24 CFStringRef fmt = CGDisplayModeCopyPixelEncoding(vidmode);
5.25 @@ -144,7 +144,7 @@
5.26 }
5.27 #endif
5.28
5.29 - #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6)
5.30 + #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
5.31 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.32 CFDictionaryRef vidmode = (CFDictionaryRef) moderef;
5.33 number = CFDictionaryGetValue(vidmode, kCGDisplayWidth);
5.34 @@ -181,7 +181,7 @@
5.35 Cocoa_ReleaseDisplayMode(_THIS, const void *moderef)
5.36 {
5.37 /* We don't own moderef unless we use the 10.6+ APIs. */
5.38 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.39 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.40 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.41 CGDisplayModeRelease((CGDisplayModeRef) moderef); /* NULL is ok */
5.42 }
5.43 @@ -192,7 +192,7 @@
5.44 Cocoa_ReleaseDisplayModeList(_THIS, CFArrayRef modelist)
5.45 {
5.46 /* We don't own modelis unless we use the 10.6+ APIs. */
5.47 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.48 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.49 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.50 CFRelease(modelist); /* NULL is ok */
5.51 }
5.52 @@ -242,13 +242,13 @@
5.53 continue;
5.54 }
5.55
5.56 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.57 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.58 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.59 moderef = CGDisplayCopyDisplayMode(displays[i]);
5.60 }
5.61 #endif
5.62
5.63 - #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6)
5.64 + #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
5.65 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.66 moderef = CGDisplayCurrentMode(displays[i]);
5.67 }
5.68 @@ -301,13 +301,13 @@
5.69 SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
5.70 CFArrayRef modes = NULL;
5.71
5.72 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.73 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.74 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.75 modes = CGDisplayCopyAllDisplayModes(data->display, NULL);
5.76 }
5.77 #endif
5.78
5.79 - #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6)
5.80 + #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
5.81 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.82 modes = CGDisplayAvailableModes(data->display);
5.83 }
5.84 @@ -321,7 +321,7 @@
5.85 const void *moderef = CFArrayGetValueAtIndex(modes, i);
5.86 SDL_DisplayMode mode;
5.87 if (GetDisplayMode(_this, moderef, &mode)) {
5.88 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.89 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.90 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.91 CGDisplayModeRetain((CGDisplayModeRef) moderef);
5.92 }
5.93 @@ -337,13 +337,13 @@
5.94 static CGError
5.95 Cocoa_SwitchMode(_THIS, CGDirectDisplayID display, const void *mode)
5.96 {
5.97 - #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
5.98 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
5.99 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.100 return CGDisplaySetDisplayMode(display, (CGDisplayModeRef) mode, NULL);
5.101 }
5.102 #endif
5.103
5.104 - #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6)
5.105 + #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
5.106 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
5.107 return CGDisplaySwitchToMode(display, (CFDictionaryRef) mode);
5.108 }
6.1 --- a/src/video/cocoa/SDL_cocoashape.m Tue Aug 23 16:47:22 2011 -0400
6.2 +++ b/src/video/cocoa/SDL_cocoashape.m Thu Aug 25 03:11:28 2011 -0400
6.3 @@ -28,7 +28,7 @@
6.4 Cocoa_CreateShaper(SDL_Window* window) {
6.5 SDL_WindowData* windata = (SDL_WindowData*)window->driverdata;
6.6 [windata->nswindow setOpaque:NO];
6.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
6.8 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
6.9 [windata->nswindow setStyleMask:NSBorderlessWindowMask];
6.10 #endif
6.11 SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper));
7.1 --- a/src/video/cocoa/SDL_cocoavideo.h Tue Aug 23 16:47:22 2011 -0400
7.2 +++ b/src/video/cocoa/SDL_cocoavideo.h Thu Aug 25 03:11:28 2011 -0400
7.3 @@ -39,7 +39,7 @@
7.4 #include "SDL_cocoaopengl.h"
7.5 #include "SDL_cocoawindow.h"
7.6
7.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
7.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
7.9 #if __LP64__
7.10 typedef long NSInteger;
7.11 typedef unsigned long NSUInteger;
8.1 --- a/src/video/cocoa/SDL_cocoawindow.h Tue Aug 23 16:47:22 2011 -0400
8.2 +++ b/src/video/cocoa/SDL_cocoawindow.h Thu Aug 25 03:11:28 2011 -0400
8.3 @@ -28,7 +28,7 @@
8.4 typedef struct SDL_WindowData SDL_WindowData;
8.5
8.6 /* *INDENT-OFF* */
8.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
8.8 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
8.9 @interface Cocoa_WindowListener : NSResponder <NSWindowDelegate> {
8.10 #else
8.11 @interface Cocoa_WindowListener : NSResponder {
9.1 --- a/src/video/cocoa/SDL_cocoawindow.m Tue Aug 23 16:47:22 2011 -0400
9.2 +++ b/src/video/cocoa/SDL_cocoawindow.m Thu Aug 25 03:11:28 2011 -0400
9.3 @@ -67,7 +67,7 @@
9.4 [window setAcceptsMouseMovedEvents:YES];
9.5
9.6 [view setNextResponder:self];
9.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
9.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
9.9 [view setAcceptsTouchEvents:YES];
9.10 #endif
9.11 }
9.12 @@ -380,7 +380,7 @@
9.13
9.14 - (void)handleTouches:(cocoaTouchType)type withEvent:(NSEvent *)event
9.15 {
9.16 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
9.17 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
9.18 NSSet *touches = 0;
9.19 NSEnumerator *enumerator;
9.20 NSTouch *touch;
9.21 @@ -442,7 +442,7 @@
9.22
9.23 touch = (NSTouch*)[enumerator nextObject];
9.24 }
9.25 -#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 */
9.26 +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 */
9.27 }
9.28
9.29 @end