diff src/video/cocoa/SDL_cocoakeyboard.m @ 4925:514f811a4887

Removed support for 10.3.9 Fixed building on Mac OS X 10.5
author Sam Lantinga <slouken@libsdl.org>
date Wed, 01 Dec 2010 12:23:16 -0800
parents c24ba2cc9583
children 25d4feb7c127
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoakeyboard.m	Wed Dec 01 12:22:29 2010 -0800
+++ b/src/video/cocoa/SDL_cocoakeyboard.m	Wed Dec 01 12:23:16 2010 -0800
@@ -171,7 +171,11 @@
 }
 
 /* Needs long instead of NSInteger for compilation on Mac OS X 10.4 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
 - (long) conversationIdentifier
+#else
+- (NSInteger) conversationIdentifier
+#endif
 {
     return (long) self;
 }
@@ -478,7 +482,7 @@
 static void
 UpdateKeymap(SDL_VideoData *data)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
     TISInputSourceRef key_layout;
 #else
     KeyboardLayoutRef key_layout;
@@ -489,7 +493,7 @@
     SDLKey keymap[SDL_NUM_SCANCODES];
 
     /* See if the keymap needs to be updated */
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
     key_layout = TISCopyCurrentKeyboardLayoutInputSource();
 #else
     KLGetCurrentKeyboardLayout(&key_layout);
@@ -502,7 +506,7 @@
     SDL_GetDefaultKeymap(keymap);
 
     /* Try Unicode data first (preferred as of Mac OS X 10.5) */
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
     CFDataRef uchrDataRef = TISGetInputSourceProperty(key_layout, kTISPropertyUnicodeKeyLayoutData);
     if (uchrDataRef)
         chr_data = CFDataGetBytePtr(uchrDataRef);
@@ -544,7 +548,7 @@
         return;
     }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
 cleanup:
     CFRelease(key_layout);
 #else