Revert "fix"

This reverts commit ed2454ea64.
This commit is contained in:
cuu
2023-01-24 14:47:42 +08:00
parent 4eefd21a8b
commit 6a360f5101
29 changed files with 104 additions and 80 deletions

10
main.go
View File

@@ -122,7 +122,8 @@ func RestoreLastBackLightBrightness(main_screen *UI.MainScreen) bool {
if main_screen.CounterScreen.Counting == true {
main_screen.CounterScreen.StopCounter()
main_screen.Refresh()
main_screen.Draw()
main_screen.SwapAndShow()
return false
}
@@ -220,7 +221,7 @@ func AutoRedraw(main_screen *UI.MainScreen) {
for {
if main_screen.TitleBar.InLowBackLight < 0 {
UI.DisplayFlip()
UI.SwapAndShow()
}
gotime.Sleep(650 * gotime.Millisecond)
}
@@ -323,7 +324,10 @@ func run() int {
sound_patch.Parent = main_screen
sound_patch.Init()
main_screen.Refresh()
main_screen.Draw()
main_screen.SwapAndShow()
UI.SwapAndShow()
//fmt.Println(main_screen)
event.AllocEvents(5)