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
1 changed files with 3 additions and 1 deletions

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 {