mirror of https://github.com/jetkvm/kvm.git
fix: wakeDisplay() doesn't need to stop the tickers
The tickers only need to be reset, if they're disabled, they won't have been started.
This commit is contained in:
parent
9896eba02a
commit
8071f81310
|
@ -162,15 +162,11 @@ func wakeDisplay(force bool) {
|
|||
fmt.Printf("display wake failed, %s\n", err)
|
||||
}
|
||||
|
||||
if config.DisplayDimAfterSec == 0 {
|
||||
dimTicker.Stop()
|
||||
} else {
|
||||
if config.DisplayDimAfterSec != 0 {
|
||||
dimTicker.Reset(time.Duration(config.DisplayDimAfterSec) * time.Second)
|
||||
}
|
||||
|
||||
if config.DisplayOffAfterSec == 0 {
|
||||
offTicker.Stop()
|
||||
} else {
|
||||
if config.DisplayOffAfterSec != 0 {
|
||||
offTicker.Reset(time.Duration(config.DisplayOffAfterSec) * time.Second)
|
||||
}
|
||||
backlightState = 0
|
||||
|
|
Loading…
Reference in New Issue