Fix busy loop (sleep wouldn't be triggered when the display is off)

This commit is contained in:
Kristóf Tóth 2020-08-21 10:35:05 +02:00
parent 78c216486f
commit 48aaf76c8a

View File

@ -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
}
}
}
}
}