mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
macOS: protect uses of __block by #if defined(__BLOCKS__) condition
This commit is contained in:
+2
-2
@@ -4722,7 +4722,7 @@ int Fl_Cocoa_Window_Driver::decorated_h()
|
|||||||
return h() + bt/s;
|
return h() + bt/s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0 && defined(__BLOCKS__)
|
||||||
|
|
||||||
// Requires -weak_framework ScreenCaptureKit and used by FLTK for macOS ≥ 15.0
|
// Requires -weak_framework ScreenCaptureKit and used by FLTK for macOS ≥ 15.0
|
||||||
static CGImageRef capture_decorated_window_SCK(NSWindow *nswin) {
|
static CGImageRef capture_decorated_window_SCK(NSWindow *nswin) {
|
||||||
@@ -4807,7 +4807,7 @@ CGImageRef Fl_Cocoa_Window_Driver::capture_decorated_window_10_5(NSWindow *nswin
|
|||||||
// usable with 10.5 and above
|
// usable with 10.5 and above
|
||||||
CGImageRef img = NULL;
|
CGImageRef img = NULL;
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||||
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0
|
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0 && defined(__BLOCKS__)
|
||||||
if (fl_mac_os_version >= 150000)
|
if (fl_mac_os_version >= 150000)
|
||||||
img = capture_decorated_window_SCK(nswin);
|
img = capture_decorated_window_SCK(nswin);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user