summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/cocoa-cb/video_layer.swift2
-rw-r--r--video/out/cocoa_cb_common.swift12
2 files changed, 7 insertions, 7 deletions
diff --git a/video/out/cocoa-cb/video_layer.swift b/video/out/cocoa-cb/video_layer.swift
index c600b06b6c..b3893273b1 100644
--- a/video/out/cocoa-cb/video_layer.swift
+++ b/video/out/cocoa-cb/video_layer.swift
@@ -89,7 +89,7 @@ class VideoLayer: CAOpenGLLayer {
if inLiveResize == false {
isAsynchronous = false
}
- return mpv != nil && cocoaCB.backendState == .init
+ return mpv != nil && cocoaCB.backendState == .initialized
}
override func draw(inCGLContext ctx: CGLContextObj,
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index e6705902c4..a4aae9ff2a 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -35,11 +35,11 @@ class CocoaCB: NSObject {
}
enum State {
- case uninit
+ case uninitialized
case needsInit
- case `init`
+ case initialized
}
- var backendState: State = .uninit
+ var backendState: State = .uninitialized
let eventsLock = NSLock()
var events: Int = 0
@@ -58,7 +58,7 @@ class CocoaCB: NSObject {
}
func preinit(_ vo: UnsafeMutablePointer<vo>) {
- if backendState == .uninit {
+ if backendState == .uninitialized {
backendState = .needsInit
if let app = NSApp as? Application {
@@ -122,7 +122,7 @@ class CocoaCB: NSObject {
window.isMovableByWindowBackground = true
}
- backendState = .init
+ backendState = .initialized
}
func updateWindowSize(_ vo: UnsafeMutablePointer<vo>) {
@@ -476,7 +476,7 @@ class CocoaCB: NSObject {
}
shutdown()
case MPV_EVENT_PROPERTY_CHANGE:
- if backendState == .init {
+ if backendState == .initialized {
handlePropertyChange(event)
}
default: