osxvideosink: fix build on macOS versions < 12.0
authorJérôme Laheurte <jerome@jeromelaheurte.net>
Sun, 1 Oct 2017 16:21:26 +0000 (18:21 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 8 Feb 2018 15:49:59 +0000 (15:49 +0000)
Use value instead of version macro when testing for mac OS version,
since the define for the newer version may not be defined when
compiling against older versions.

https://bugzilla.gnome.org/show_bug.cgi?id=788402

sys/osxvideo/cocoawindow.m
sys/osxvideo/osxvideosink.m

index b833a8a..dab0425 100644 (file)
@@ -41,7 +41,7 @@
 /* Debugging category */
 #include <gst/gstinfo.h>
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 101200
 #define NSEventTypeMouseMoved                NSMouseMoved
 #define NSEventTypeLeftMouseDown             NSLeftMouseDown
 #define NSEventTypeLeftMouseUp               NSLeftMouseUp
index 54725a2..a140d51 100644 (file)
@@ -82,7 +82,7 @@ static GCond _run_loop_cond;
 static GstOSXVideoSinkClass *sink_class = NULL;
 static GstVideoSinkClass *parent_class = NULL;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 101200
 #define NSEventMaskAny                       NSAnyEventMask
 #define NSWindowStyleMaskTitled              NSTitledWindowMask
 #define NSWindowStyleMaskClosable            NSClosableWindowMask