summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-03-19 21:36:07 +0100
committerder richter <der.richter@gmx.de>2024-03-21 18:33:15 +0100
commit6defd49aa1f1d7b8a4d536c2a9fbf856dcf541db (patch)
treec00c8a69e190c1cd6026e5a900d13bc1a9c4e854 /video/out/cocoa_cb_common.swift
parent90c534a8213a84c78f54d093c429d65b0c80a811 (diff)
downloadmpv-6defd49aa1f1d7b8a4d536c2a9fbf856dcf541db.tar.bz2
mpv-6defd49aa1f1d7b8a4d536c2a9fbf856dcf541db.tar.xz
mac/option: make option helper vo struct independent
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index 624f2bec4b..b482499646 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -35,11 +35,12 @@ class CocoaCB: Common {
let newlog = mp_log_new(UnsafeMutablePointer<MPContext>(mpvHandle), mp_client_get_log(mpvHandle), "cocoacb")
libmpv = LibmpvHelper(mpvHandle, newlog)
super.init(newlog)
+ option = OptionHelper(UnsafeMutablePointer(mpvHandle), mp_client_get_global(mpvHandle))
layer = GLLayer(cocoaCB: self)
}
func preinit(_ vo: UnsafeMutablePointer<vo>) {
- option = OptionHelper(vo)
+ self.vo = vo
input = InputHelper(vo.pointee.input_ctx, option)
if backendState == .uninitialized {
@@ -62,7 +63,7 @@ class CocoaCB: Common {
}
func reconfig(_ vo: UnsafeMutablePointer<vo>) {
- option?.vo = vo
+ self.vo = vo
if backendState == .needsInit {
DispatchQueue.main.sync { self.initBackend(vo) }
} else if option?.opts.auto_window_resize ?? true {