diff options
author | der richter <der.richter@gmx.de> | 2024-03-19 19:50:44 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-03-21 18:33:15 +0100 |
commit | dc5059d0279a1d809022760b67b4a9d64854d294 (patch) | |
tree | b61a259def741f7c0a719613a1a4b40181541b9e /video/out/cocoa_cb_common.swift | |
parent | 283d0877c470bf10efff390ea8037a819db501a7 (diff) | |
download | mpv-dc5059d0279a1d809022760b67b4a9d64854d294.tar.bz2 mpv-dc5059d0279a1d809022760b67b4a9d64854d294.tar.xz |
mac/option: move option functionality from mpv helper to option helper
delete now empty mpv helper
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r-- | video/out/cocoa_cb_common.swift | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index 46e999fbb2..d92b5efbcb 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -39,8 +39,8 @@ class CocoaCB: Common { } func preinit(_ vo: UnsafeMutablePointer<vo>) { - mpv = MPVHelper(vo, log) - input = InputHelper(vo.pointee.input_ctx, mpv) + option = OptionHelper(vo, log) + input = InputHelper(vo.pointee.input_ctx, option) if backendState == .uninitialized { backendState = .needsInit @@ -58,18 +58,18 @@ class CocoaCB: Common { func uninit() { window?.orderOut(nil) window?.close() - mpv = nil + option = nil } func reconfig(_ vo: UnsafeMutablePointer<vo>) { - mpv?.vo = vo + option?.vo = vo if backendState == .needsInit { DispatchQueue.main.sync { self.initBackend(vo) } - } else if mpv?.opts.auto_window_resize ?? true { + } else if option?.opts.auto_window_resize ?? true { DispatchQueue.main.async { self.updateWindowSize(vo) self.layer?.update(force: true) - if self.mpv?.opts.focus_on ?? 1 == 2 { + if self.option?.opts.focus_on ?? 1 == 2 { NSApp.activate(ignoringOtherApps: true) } } @@ -204,7 +204,7 @@ class CocoaCB: Common { func shutdown(_ destroy: Bool = false) { isShuttingDown = window?.isAnimating ?? false || - window?.isInFullscreen ?? false && mpv?.opts.native_fs ?? true + window?.isInFullscreen ?? false && option?.opts.native_fs ?? true if window?.isInFullscreen ?? false && !(window?.isAnimating ?? false) { window?.close() } |