mpv: Delays the fade in after enable returns
This commit is contained in:
parent
1ae02a7d47
commit
e38f103b82
1 changed files with 13 additions and 6 deletions
|
@ -124,13 +124,20 @@ func (s *MPVSource) Enable() (err error) {
|
|||
}
|
||||
|
||||
var pfc interface{}
|
||||
pfc, err = conn.Get("core-idle")
|
||||
|
||||
if err == nil && pfc.(bool) {
|
||||
go func() {
|
||||
for err == nil && pfc.(bool) {
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
pfc, err = conn.Get("core-idle")
|
||||
}
|
||||
err = nil
|
||||
|
||||
s.FadeIn(conn, 3, 50)
|
||||
}()
|
||||
} else {
|
||||
s.FadeIn(conn, 3, 50)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue