init display before network initialization

This commit is contained in:
Siyuan 2025-10-08 10:28:32 +00:00
parent abb8c4f0b5
commit db64c649d4
2 changed files with 4 additions and 5 deletions

View File

@ -175,7 +175,7 @@ func requestDisplayUpdate(shouldWakeDisplay bool, reason string) {
wakeDisplay(false, reason)
}
displayLogger.Debug().Msg("display updating")
//TODO: only run once regardless how many pending updates
// TODO: only run once regardless how many pending updates
updateDisplay()
}()
}
@ -184,7 +184,6 @@ func waitCtrlAndRequestDisplayUpdate(shouldWakeDisplay bool, reason string) {
waitDisplayUpdate.Lock()
defer waitDisplayUpdate.Unlock()
// nativeInstance.WaitCtrlClientConnected()
requestDisplayUpdate(shouldWakeDisplay, reason)
}

View File

@ -35,6 +35,9 @@ func Main() {
initNative(systemVersionLocal, appVersionLocal)
// initialize display
initDisplay()
http.DefaultClient.Timeout = 1 * time.Minute
err = rootcerts.UpdateDefaultTransport()
@ -74,9 +77,6 @@ func Main() {
}
initJiggler()
// initialize display
initDisplay()
go func() {
time.Sleep(15 * time.Minute)
for {