mac/vulkan: set NSView as layer delegate like recommended by MoltenVK

This commit is contained in:
der richter 2024-02-29 14:13:29 +01:00
parent 9b301a0537
commit 7758f6f50e
2 changed files with 2 additions and 1 deletions

View File

@ -142,6 +142,7 @@ class Common: NSObject {
view.layer = layer view.layer = layer
view.wantsLayer = true view.wantsLayer = true
view.layerContentsPlacement = .scaleProportionallyToFit view.layerContentsPlacement = .scaleProportionallyToFit
layer.delegate = view
} }
func initWindowState() { func initWindowState() {

View File

@ -17,7 +17,7 @@
import Cocoa import Cocoa
class View: NSView { class View: NSView, CALayerDelegate {
unowned var common: Common unowned var common: Common
var mpv: MPVHelper? { get { return common.mpv } } var mpv: MPVHelper? { get { return common.mpv } }