summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift9
1 files changed, 4 insertions, 5 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index bd4ac44727..7ac0f35096 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -21,7 +21,7 @@ class CocoaCB: Common {
var libmpv: LibmpvHelper
var layer: GLLayer?
- @objc var isShuttingDown: Bool = false
+ var isShuttingDown: Bool = false
enum State {
case uninitialized
@@ -199,7 +199,7 @@ class CocoaCB: Common {
return super.control(vo, events: events, request: request, data: data)
}
- func shutdown(_ destroy: Bool = false) {
+ func shutdown() {
isShuttingDown = window?.isAnimating ?? false ||
window?.isInFullscreen ?? false && option.vo.native_fs
if window?.isInFullscreen ?? false && !(window?.isAnimating ?? false) {
@@ -211,14 +211,13 @@ class CocoaCB: Common {
uninitCommon()
layer?.lockCglContext()
- libmpv.deinitRender()
+ libmpv.uninit()
layer?.unlockCglContext()
- libmpv.deinitMPV(destroy)
}
func checkShutdown() {
if isShuttingDown {
- shutdown(true)
+ shutdown()
}
}