From e3a290b61828b21b37d76d353746ab3f9718acfc Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 15 Jun 2024 15:06:04 +0200 Subject: [PATCH] mac/compat: fix broken CGColorSpace declaration on SDK 11 only seems like apple missed those two colour spaces and didn't add a obj-c to swift redeclaration of the CFStringRef kCGColorSpace* global variables. --- osdep/mac/swift_compat.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osdep/mac/swift_compat.swift b/osdep/mac/swift_compat.swift index 54fadee3e2..24365cdd4a 100644 --- a/osdep/mac/swift_compat.swift +++ b/osdep/mac/swift_compat.swift @@ -43,3 +43,11 @@ extension NSDraggingInfo { } } #endif + +#if !HAVE_MACOS_12_FEATURES && HAVE_MACOS_11_FEATURES +@available(macOS 11.0, *) +extension CGColorSpace { + static let itur_2100_HLG: CFString = kCGColorSpaceITUR_2100_HLG + static let itur_2100_PQ: CFString = kCGColorSpaceITUR_2100_PQ +} +#endif