From 5b1c0a4cfd52ee25b6d6caa2851f7699a736b187 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 31 Dec 2013 10:10:05 +0100 Subject: [PATCH] osx: Make OSX version checks more consistent And especially also consider update versions, e.g. 10.5 with updates will be 1051 or similar and thus bigger than MAC_OS_X_VERSION_10_5 but still won't have the API we want to use. --- sys/osxaudio/gstosxcoreaudio.h | 2 +- sys/osxvideo/cocoawindow.m | 4 ++-- sys/osxvideo/osxvideosink.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/osxaudio/gstosxcoreaudio.h b/sys/osxaudio/gstosxcoreaudio.h index 421ff62..78cd4b9 100644 --- a/sys/osxaudio/gstosxcoreaudio.h +++ b/sys/osxaudio/gstosxcoreaudio.h @@ -34,7 +34,7 @@ #else #include #include - #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5 + #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 #include #define AudioComponentFindNext FindNextComponent #define AudioComponentInstanceNew OpenAComponent diff --git a/sys/osxvideo/cocoawindow.m b/sys/osxvideo/cocoawindow.m index dd04395..75b43cd 100644 --- a/sys/osxvideo/cocoawindow.m +++ b/sys/osxvideo/cocoawindow.m @@ -41,7 +41,7 @@ /* Debugging category */ #include -#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 #define kVK_ANSI_Keypad0 0x52 #define kVK_ANSI_Keypad1 0x53 #define kVK_ANSI_Keypad2 0x54 @@ -87,7 +87,7 @@ #define kVK_Shift 0x38 #define kVK_Tab 0x30 #define kVK_UpArrow 0x7e -#endif /* MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 */ +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1050 */ static const gchar* gst_keycode_to_keyname(gint16 keycode) diff --git a/sys/osxvideo/osxvideosink.h b/sys/osxvideo/osxvideosink.h index ce55c7f..dcdd746 100644 --- a/sys/osxvideo/osxvideosink.h +++ b/sys/osxvideo/osxvideosink.h @@ -106,7 +106,7 @@ struct _GstOSXVideoSinkClass { GType gst_osx_video_sink_get_type(void); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 @interface NSApplication(AppleMenu) - (void)setAppleMenu:(NSMenu *)menu; @end @@ -122,7 +122,7 @@ GType gst_osx_video_sink_get_type(void); @end -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 @interface GstWindowDelegate : NSObject #else @interface GstWindowDelegate : NSObject -- 2.7.4