Mac: Codify SDK and OS requirements, and clean up.
This #errors if you're using an SDK or deployment target that is less
than 10.6 and 10.5, respectively, and cleans up uses of
MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED according
to those requirements.
1.1 --- a/build-scripts/g++-fat.sh Tue Jul 23 12:59:29 2013 -0700
1.2 +++ b/build-scripts/g++-fat.sh Tue Jul 23 17:38:59 2013 -0700
1.3 @@ -7,15 +7,13 @@
1.4 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
1.5
1.6 # Intel 32-bit compiler flags (10.6 runtime compatibility)
1.7 -GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.6 \
1.8 --DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
1.9 +GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.5 \
1.10 -I/usr/local/include"
1.11
1.12 -GCC_LINK_X86="-mmacosx-version-min=10.6"
1.13 +GCC_LINK_X86="-mmacosx-version-min=10.5"
1.14
1.15 # Intel 64-bit compiler flags (10.6 runtime compatibility)
1.16 GCC_COMPILE_X64="g++ -arch x86_64 -mmacosx-version-min=10.6 \
1.17 --DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
1.18 -I/usr/local/include"
1.19
1.20 GCC_LINK_X64="-mmacosx-version-min=10.6"
2.1 --- a/build-scripts/gcc-fat.sh Tue Jul 23 12:59:29 2013 -0700
2.2 +++ b/build-scripts/gcc-fat.sh Tue Jul 23 17:38:59 2013 -0700
2.3 @@ -6,12 +6,11 @@
2.4
2.5 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
2.6
2.7 -# Intel 32-bit compiler flags (10.6 runtime compatibility)
2.8 -GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.6 \
2.9 --DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
2.10 +# Intel 32-bit compiler flags (10.5 runtime compatibility)
2.11 +GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.5 \
2.12 -I/usr/local/include"
2.13
2.14 -GCC_LINK_X86="-mmacosx-version-min=10.6"
2.15 +GCC_LINK_X86="-mmacosx-version-min=10.5"
2.16
2.17 # Intel 64-bit compiler flags (10.6 runtime compatibility)
2.18 GCC_COMPILE_X64="gcc -arch x86_64 -mmacosx-version-min=10.6 \
3.1 --- a/cmake/sdlchecks.cmake Tue Jul 23 12:59:29 2013 -0700
3.2 +++ b/cmake/sdlchecks.cmake Tue Jul 23 17:38:59 2013 -0700
3.3 @@ -18,10 +18,10 @@
3.4 endif()
3.5 check_c_source_compiles("
3.6 #include <dlfcn.h>
3.7 - #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
3.8 - #error Use dlcompat for Mac OS X 10.2 compatibility
3.9 - #endif
3.10 - int main(int argc, char **argv) {}" HAVE_DLOPEN)
3.11 + int main(int argc, char **argv) {
3.12 + void *handle = dlopen("", RTLD_NOW);
3.13 + const char *loaderror = (char *) dlerror();
3.14 + }" HAVE_DLOPEN)
3.15 set(CMAKE_REQUIRED_LIBRARIES)
3.16 endif()
3.17
4.1 --- a/configure.in Tue Jul 23 12:59:29 2013 -0700
4.2 +++ b/configure.in Tue Jul 23 17:38:59 2013 -0700
4.3 @@ -2129,9 +2129,8 @@
4.4 AC_TRY_COMPILE([
4.5 #include <dlfcn.h>
4.6 ],[
4.7 - #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
4.8 - #error Use dlcompat for Mac OS X 10.2 compatibility
4.9 - #endif
4.10 + void *handle = dlopen("", RTLD_NOW);
4.11 + const char *loaderror = (char *) dlerror();
4.12 ],[
4.13 have_dlopen=yes
4.14 ])
5.1 --- a/include/SDL_config_macosx.h Tue Jul 23 12:59:29 2013 -0700
5.2 +++ b/include/SDL_config_macosx.h Tue Jul 23 17:38:59 2013 -0700
5.3 @@ -36,10 +36,7 @@
5.4 #endif
5.5
5.6 /* Useful headers */
5.7 -/* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */
5.8 -#if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) )
5.9 #define HAVE_ALLOCA_H 1
5.10 -#endif
5.11 #define HAVE_SYS_TYPES_H 1
5.12 #define HAVE_STDIO_H 1
5.13 #define STDC_HEADERS 1
6.1 --- a/include/SDL_platform.h Tue Jul 23 12:59:29 2013 -0700
6.2 +++ b/include/SDL_platform.h Tue Jul 23 17:38:59 2013 -0700
6.3 @@ -83,6 +83,12 @@
6.4 /* if not compiling for iPhone */
6.5 #undef __MACOSX__
6.6 #define __MACOSX__ 1
6.7 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
6.8 +# error SDL for Mac OS X only supports deploying on 10.5 and above.
6.9 +#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
6.10 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
6.11 +# error SDL for Mac OS X must be built with a 10.6 SDK or above.
6.12 +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */
6.13 #endif /* TARGET_OS_IPHONE */
6.14 #endif /* defined(__APPLE__) */
6.15
7.1 --- a/src/audio/coreaudio/SDL_coreaudio.h Tue Jul 23 12:59:29 2013 -0700
7.2 +++ b/src/audio/coreaudio/SDL_coreaudio.h Tue Jul 23 17:38:59 2013 -0700
7.3 @@ -32,9 +32,6 @@
7.4 #if MACOSX_COREAUDIO
7.5 #include <CoreAudio/CoreAudio.h>
7.6 #include <CoreServices/CoreServices.h>
7.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050
7.8 -#include <AudioUnit/AUNTComponent.h>
7.9 -#endif
7.10 #else
7.11 #include <AudioToolbox/AudioToolbox.h>
7.12 #endif
8.1 --- a/src/video/cocoa/SDL_cocoaclipboard.m Tue Jul 23 12:59:29 2013 -0700
8.2 +++ b/src/video/cocoa/SDL_cocoaclipboard.m Tue Jul 23 17:38:59 2013 -0700
8.3 @@ -28,7 +28,6 @@
8.4 static NSString *
8.5 GetTextFormat(_THIS)
8.6 {
8.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
8.8 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
8.9
8.10 if (data->osversion >= 0x1060) {
8.11 @@ -36,9 +35,6 @@
8.12 } else {
8.13 return NSStringPboardType;
8.14 }
8.15 -#else
8.16 - return NSStringPboardType;
8.17 -#endif
8.18 }
8.19
8.20 int
9.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m Tue Jul 23 12:59:29 2013 -0700
9.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m Tue Jul 23 17:38:59 2013 -0700
9.3 @@ -172,14 +172,9 @@
9.4 return nil;
9.5 }
9.6
9.7 -/* Needs long instead of NSInteger for compilation on Mac OS X 10.4 */
9.8 -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
9.9 -- (long) conversationIdentifier
9.10 -#else
9.11 - (NSInteger) conversationIdentifier
9.12 -#endif
9.13 {
9.14 - return (long) self;
9.15 + return (NSInteger) self;
9.16 }
9.17
9.18 /* This method returns the index for character that is
9.19 @@ -486,22 +481,14 @@
9.20 static void
9.21 UpdateKeymap(SDL_VideoData *data)
9.22 {
9.23 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
9.24 TISInputSourceRef key_layout;
9.25 -#else
9.26 - KeyboardLayoutRef key_layout;
9.27 -#endif
9.28 const void *chr_data;
9.29 int i;
9.30 SDL_Scancode scancode;
9.31 SDL_Keycode keymap[SDL_NUM_SCANCODES];
9.32
9.33 /* See if the keymap needs to be updated */
9.34 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
9.35 key_layout = TISCopyCurrentKeyboardLayoutInputSource();
9.36 -#else
9.37 - KLGetCurrentKeyboardLayout(&key_layout);
9.38 -#endif
9.39 if (key_layout == data->key_layout) {
9.40 return;
9.41 }
9.42 @@ -509,16 +496,13 @@
9.43
9.44 SDL_GetDefaultKeymap(keymap);
9.45
9.46 - /* Try Unicode data first (preferred as of Mac OS X 10.5) */
9.47 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
9.48 + /* Try Unicode data first */
9.49 CFDataRef uchrDataRef = TISGetInputSourceProperty(key_layout, kTISPropertyUnicodeKeyLayoutData);
9.50 if (uchrDataRef)
9.51 chr_data = CFDataGetBytePtr(uchrDataRef);
9.52 else
9.53 goto cleanup;
9.54 -#else
9.55 - KLGetKeyboardLayoutProperty(key_layout, kKLuchrData, &chr_data);
9.56 -#endif
9.57 +
9.58 if (chr_data) {
9.59 UInt32 keyboard_type = LMGetKbdType();
9.60 OSStatus err;
9.61 @@ -552,60 +536,8 @@
9.62 return;
9.63 }
9.64
9.65 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
9.66 cleanup:
9.67 CFRelease(key_layout);
9.68 -#else
9.69 - /* Fall back to older style key map data */
9.70 - KLGetKeyboardLayoutProperty(key_layout, kKLKCHRData, &chr_data);
9.71 - if (chr_data) {
9.72 - for (i = 0; i < 128; i++) {
9.73 - UInt32 c, state = 0;
9.74 -
9.75 - /* Make sure this scancode is a valid character scancode */
9.76 - scancode = darwin_scancode_table[i];
9.77 - if (scancode == SDL_SCANCODE_UNKNOWN ||
9.78 - (keymap[scancode] & SDLK_SCANCODE_MASK)) {
9.79 - continue;
9.80 - }
9.81 -
9.82 - c = KeyTranslate (chr_data, i, &state) & 255;
9.83 - if (state) {
9.84 - /* Dead key, process key up */
9.85 - c = KeyTranslate (chr_data, i | 128, &state) & 255;
9.86 - }
9.87 -
9.88 - if (c != 0 && c != 0x10) {
9.89 - /* MacRoman to Unicode table, taken from X.org sources */
9.90 - static const unsigned short macroman_table[128] = {
9.91 - 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1,
9.92 - 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8,
9.93 - 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3,
9.94 - 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc,
9.95 - 0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf,
9.96 - 0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8,
9.97 - 0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211,
9.98 - 0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8,
9.99 - 0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab,
9.100 - 0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153,
9.101 - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca,
9.102 - 0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02,
9.103 - 0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1,
9.104 - 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4,
9.105 - 0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc,
9.106 - 0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7,
9.107 - };
9.108 -
9.109 - if (c >= 128) {
9.110 - c = macroman_table[c - 128];
9.111 - }
9.112 - keymap[scancode] = c;
9.113 - }
9.114 - }
9.115 - SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
9.116 - return;
9.117 - }
9.118 -#endif
9.119 }
9.120
9.121 void
10.1 --- a/src/video/cocoa/SDL_cocoamodes.m Tue Jul 23 12:59:29 2013 -0700
10.2 +++ b/src/video/cocoa/SDL_cocoamodes.m Tue Jul 23 17:38:59 2013 -0700
10.3 @@ -30,6 +30,9 @@
10.4 /* we need this for ShowMenuBar() and HideMenuBar(). */
10.5 #include <Carbon/Carbon.h>
10.6
10.7 +/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
10.8 +#include <AvailabilityMacros.h>
10.9 +
10.10 static inline void Cocoa_ToggleMenuBar(const BOOL show)
10.11 {
10.12 /* !!! FIXME: keep an eye on this.
10.13 @@ -47,33 +50,13 @@
10.14
10.15
10.16 /* !!! FIXME: clean out the pre-10.6 code when it makes sense to do so. */
10.17 -#define FORCE_OLD_API 0 || (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
10.18 +#define FORCE_OLD_API 0
10.19
10.20 #if FORCE_OLD_API
10.21 #undef MAC_OS_X_VERSION_MIN_REQUIRED
10.22 #define MAC_OS_X_VERSION_MIN_REQUIRED 1050
10.23 #endif
10.24
10.25 -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
10.26 -/*
10.27 - Add methods to get at private members of NSScreen.
10.28 - Since there is a bug in Apple's screen switching code
10.29 - that does not update this variable when switching
10.30 - to fullscreen, we'll set it manually (but only for the
10.31 - main screen).
10.32 -*/
10.33 -@interface NSScreen (NSScreenAccess)
10.34 -- (void) setFrame:(NSRect)frame;
10.35 -@end
10.36 -
10.37 -@implementation NSScreen (NSScreenAccess)
10.38 -- (void) setFrame:(NSRect)frame;
10.39 -{
10.40 - _frame = frame;
10.41 -}
10.42 -@end
10.43 -#endif
10.44 -
10.45 static inline BOOL
10.46 IS_SNOW_LEOPARD_OR_LATER(_THIS)
10.47 {
10.48 @@ -142,7 +125,6 @@
10.49 }
10.50 data->moderef = moderef;
10.51
10.52 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.53 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.54 CGDisplayModeRef vidmode = (CGDisplayModeRef) moderef;
10.55 CFStringRef fmt = CGDisplayModeCopyPixelEncoding(vidmode);
10.56 @@ -162,7 +144,6 @@
10.57
10.58 CFRelease(fmt);
10.59 }
10.60 - #endif
10.61
10.62 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
10.63 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.64 @@ -201,23 +182,17 @@
10.65 static inline void
10.66 Cocoa_ReleaseDisplayMode(_THIS, const void *moderef)
10.67 {
10.68 - /* We don't own moderef unless we use the 10.6+ APIs. */
10.69 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.70 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.71 CGDisplayModeRelease((CGDisplayModeRef) moderef); /* NULL is ok */
10.72 }
10.73 - #endif
10.74 }
10.75
10.76 static inline void
10.77 Cocoa_ReleaseDisplayModeList(_THIS, CFArrayRef modelist)
10.78 {
10.79 - /* We don't own modelis unless we use the 10.6+ APIs. */
10.80 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.81 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.82 CFRelease(modelist); /* NULL is ok */
10.83 }
10.84 - #endif
10.85 }
10.86
10.87 static const char *
10.88 @@ -280,11 +255,9 @@
10.89 continue;
10.90 }
10.91
10.92 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.93 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.94 moderef = CGDisplayCopyDisplayMode(displays[i]);
10.95 }
10.96 - #endif
10.97
10.98 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
10.99 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.100 @@ -344,11 +317,9 @@
10.101 SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
10.102 CFArrayRef modes = NULL;
10.103
10.104 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.105 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.106 modes = CGDisplayCopyAllDisplayModes(data->display, NULL);
10.107 }
10.108 - #endif
10.109
10.110 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
10.111 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.112 @@ -364,11 +335,9 @@
10.113 const void *moderef = CFArrayGetValueAtIndex(modes, i);
10.114 SDL_DisplayMode mode;
10.115 if (GetDisplayMode(_this, moderef, &mode)) {
10.116 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.117 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.118 CGDisplayModeRetain((CGDisplayModeRef) moderef);
10.119 }
10.120 - #endif
10.121 SDL_AddDisplayMode(display, &mode);
10.122 }
10.123 }
10.124 @@ -380,12 +349,10 @@
10.125 static CGError
10.126 Cocoa_SwitchMode(_THIS, CGDirectDisplayID display, const void *mode)
10.127 {
10.128 - #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
10.129 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.130 return CGDisplaySetDisplayMode(display, (CGDisplayModeRef) mode, NULL);
10.131 }
10.132 - #endif
10.133 -
10.134 +
10.135 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
10.136 if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
10.137 return CGDisplaySwitchToMode(display, (CFDictionaryRef) mode);
11.1 --- a/src/video/cocoa/SDL_cocoashape.m Tue Jul 23 12:59:29 2013 -0700
11.2 +++ b/src/video/cocoa/SDL_cocoashape.m Tue Jul 23 17:38:59 2013 -0700
11.3 @@ -33,9 +33,11 @@
11.4 Cocoa_CreateShaper(SDL_Window* window) {
11.5 SDL_WindowData* windata = (SDL_WindowData*)window->driverdata;
11.6 [windata->nswindow setOpaque:NO];
11.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
11.8 - [windata->nswindow setStyleMask:NSBorderlessWindowMask];
11.9 -#endif
11.10 +
11.11 + if ([windata->nswindow respondsToSelector:@selector(setStyleMask:)]) {
11.12 + [windata->nswindow setStyleMask:NSBorderlessWindowMask];
11.13 + }
11.14 +
11.15 SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper));
11.16 result->window = window;
11.17 result->mode.mode = ShapeModeDefault;
12.1 --- a/src/video/cocoa/SDL_cocoavideo.h Tue Jul 23 12:59:29 2013 -0700
12.2 +++ b/src/video/cocoa/SDL_cocoavideo.h Tue Jul 23 17:38:59 2013 -0700
12.3 @@ -39,16 +39,6 @@
12.4 #include "SDL_cocoaopengl.h"
12.5 #include "SDL_cocoawindow.h"
12.6
12.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
12.8 -#if __LP64__
12.9 -typedef long NSInteger;
12.10 -typedef unsigned long NSUInteger;
12.11 -#else
12.12 -typedef int NSInteger;
12.13 -typedef unsigned int NSUInteger;
12.14 -#endif
12.15 -#endif
12.16 -
12.17 /* Private display data */
12.18
12.19 @class SDLTranslatorResponder;
13.1 --- a/src/video/cocoa/SDL_cocoawindow.h Tue Jul 23 12:59:29 2013 -0700
13.2 +++ b/src/video/cocoa/SDL_cocoawindow.h Tue Jul 23 17:38:59 2013 -0700
13.3 @@ -27,12 +27,7 @@
13.4
13.5 typedef struct SDL_WindowData SDL_WindowData;
13.6
13.7 -/* *INDENT-OFF* */
13.8 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
13.9 @interface Cocoa_WindowListener : NSResponder <NSWindowDelegate> {
13.10 -#else
13.11 -@interface Cocoa_WindowListener : NSResponder {
13.12 -#endif
13.13 SDL_WindowData *_data;
13.14 BOOL observingVisible;
13.15 BOOL wasVisible;
14.1 --- a/src/video/cocoa/SDL_cocoawindow.m Tue Jul 23 12:59:29 2013 -0700
14.2 +++ b/src/video/cocoa/SDL_cocoawindow.m Tue Jul 23 17:38:59 2013 -0700
14.3 @@ -81,11 +81,9 @@
14.4
14.5 [view setNextResponder:self];
14.6
14.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
14.8 if ([view respondsToSelector:@selector(setAcceptsTouchEvents:)]) {
14.9 [view setAcceptsTouchEvents:YES];
14.10 }
14.11 -#endif
14.12 }
14.13
14.14 - (void)observeValueForKeyPath:(NSString *)keyPath
14.15 @@ -450,7 +448,6 @@
14.16
14.17 - (void)handleTouches:(cocoaTouchType)type withEvent:(NSEvent *)event
14.18 {
14.19 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
14.20 NSSet *touches = 0;
14.21 NSEnumerator *enumerator;
14.22 NSTouch *touch;
14.23 @@ -499,7 +496,6 @@
14.24
14.25 touch = (NSTouch*)[enumerator nextObject];
14.26 }
14.27 -#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 */
14.28 }
14.29
14.30 @end
14.31 @@ -939,8 +935,6 @@
14.32 void
14.33 Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
14.34 {
14.35 - /* this message arrived in 10.6. You're out of luck on older OSes. */
14.36 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
14.37 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
14.38 NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
14.39 if ([nswindow respondsToSelector:@selector(setStyleMask:)]) {
14.40 @@ -950,7 +944,6 @@
14.41 }
14.42 }
14.43 [pool release];
14.44 -#endif
14.45 }
14.46
14.47 void