Fix busy loop (sleep wouldn't be triggered when the display is off)
This commit is contained in:
parent
78c216486f
commit
48aaf76c8a
@ -112,15 +112,15 @@ func (af *AfterLock) hybernateDisplayLoop() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
time.Sleep(time.Duration(af.LoopDelay) * time.Second)
|
time.Sleep(time.Duration(af.LoopDelay) * time.Second)
|
||||||
if af.keypressFlag.Get() {
|
if af.keypressFlag.Get() {
|
||||||
af.keypressFlag.Set(false)
|
af.keypressFlag.Set(false)
|
||||||
continue
|
continue
|
||||||
} else {
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user