mirror of https://github.com/mpv-player/mpv
mac: fix build on older swift versions
this is apparently something that was added with swift 5.5, though it is hard to find anything officially. don't capture self in closure but explicitly access all variables by prepending self. Fixes #12653
This commit is contained in:
parent
1c98ab6239
commit
040a921964
|
@ -111,11 +111,11 @@ class MacCommon: Common {
|
|||
_ flagsOut: UnsafeMutablePointer<CVOptionFlags>) -> CVReturn
|
||||
{
|
||||
let frameTimer = mpv?.macOpts.macos_render_timer ?? Int32(RENDER_TIMER_CALLBACK)
|
||||
let signalSwap = { [self] in
|
||||
swapLock.lock()
|
||||
swapTime += 1
|
||||
swapLock.signal()
|
||||
swapLock.unlock()
|
||||
let signalSwap = {
|
||||
self.swapLock.lock()
|
||||
self.swapTime += 1
|
||||
self.swapLock.signal()
|
||||
self.swapLock.unlock()
|
||||
}
|
||||
|
||||
if frameTimer != RENDER_TIMER_SYSTEM {
|
||||
|
|
Loading…
Reference in New Issue