diff options
author | der richter <der.richter@gmx.de> | 2024-02-29 14:13:29 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-02-29 16:38:10 +0100 |
commit | 7758f6f50e103ffecea7f02cf8cc148790b86bb6 (patch) | |
tree | f353e5dde8641153eca7dd84783632773e2bb75a | |
parent | 9b301a0537ff9afba27688cec69ac5dc027f3494 (diff) | |
download | mpv-7758f6f50e103ffecea7f02cf8cc148790b86bb6.tar.bz2 mpv-7758f6f50e103ffecea7f02cf8cc148790b86bb6.tar.xz |
mac/vulkan: set NSView as layer delegate like recommended by MoltenVK
-rw-r--r-- | video/out/mac/common.swift | 1 | ||||
-rw-r--r-- | video/out/mac/view.swift | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift index 03d5c5bc25..8e7aab75ec 100644 --- a/video/out/mac/common.swift +++ b/video/out/mac/common.swift @@ -142,6 +142,7 @@ class Common: NSObject { view.layer = layer view.wantsLayer = true view.layerContentsPlacement = .scaleProportionallyToFit + layer.delegate = view } func initWindowState() { diff --git a/video/out/mac/view.swift b/video/out/mac/view.swift index a05127f0c3..89a2bc88ea 100644 --- a/video/out/mac/view.swift +++ b/video/out/mac/view.swift @@ -17,7 +17,7 @@ import Cocoa -class View: NSView { +class View: NSView, CALayerDelegate { unowned var common: Common var mpv: MPVHelper? { get { return common.mpv } } |