mirror of https://github.com/mpv-player/mpv
cocoa-cb: wakeup vo when new events are available
new events were added but not fetched by the vo, because we didn't signal the vo that new events were available. actually wakeup the vo when new events are available.
This commit is contained in:
parent
61005e10ea
commit
48a463d641
|
@ -34,6 +34,7 @@ class MPVHelper: NSObject {
|
|||
var mpvLog: OpaquePointer?
|
||||
var inputContext: OpaquePointer?
|
||||
var mpctx: UnsafeMutablePointer<MPContext>?
|
||||
var vo: UnsafeMutablePointer<vo>?
|
||||
var macOpts: macos_opts?
|
||||
var fbo: GLint = 1
|
||||
let deinitLock = NSLock()
|
||||
|
|
|
@ -88,6 +88,7 @@ class CocoaCB: NSObject {
|
|||
|
||||
func initBackend(_ vo: UnsafeMutablePointer<vo>) {
|
||||
let opts: mp_vo_opts = vo.pointee.opts.pointee
|
||||
mpv.vo = vo
|
||||
NSApp.setActivationPolicy(.regular)
|
||||
setAppIcon()
|
||||
|
||||
|
@ -363,6 +364,7 @@ class CocoaCB: NSObject {
|
|||
eventsLock.lock()
|
||||
events |= ev
|
||||
eventsLock.unlock()
|
||||
vo_wakeup(mpv.vo)
|
||||
}
|
||||
|
||||
func checkEvents() -> Int {
|
||||
|
|
Loading…
Reference in New Issue