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 {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
for {
|
||||
time.Sleep(time.Duration(af.LoopDelay) * time.Second)
|
||||
if af.keypressFlag.Get() {
|
||||
af.keypressFlag.Set(false)
|
||||
continue
|
||||
} else {
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user