1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00

cocoa-cb: fix crash on macOS 10.10

the colorspace of the layer is only available on 10.11 and upwards.

Fixes #6041
This commit is contained in:
Akemi 2018-07-30 19:56:30 +02:00 committed by sfan5
parent 6bf0edc59c
commit 049816c145

View File

@ -241,7 +241,9 @@ class CocoaCB: NSObject {
func updateICCProfile() {
mpv.setRenderICCProfile(window.screen!.colorSpace!)
layer.colorspace = window.screen!.colorSpace!.cgColorSpace!
if #available(macOS 10.11, *) {
layer.colorspace = window.screen!.colorSpace!.cgColorSpace!
}
}
func lmuToLux(_ v: UInt64) -> Int {