big update, add goroutine sdl render

replace a lot of self.Screen.Draw() to self.Screen.Refresh()
This commit is contained in:
cuu
2023-01-23 14:04:11 +00:00
parent 057bcc86f1
commit 7814f9ca6f
40 changed files with 358 additions and 403 deletions

View File

@@ -497,13 +497,14 @@ func run() int {
func main() {
var exitcode int
defer sdl.Quit()
defer gogame.Quit()
//runtime.GOMAXPROCS(1)
os.Setenv("SDL_VIDEO_CENTERED", "1")
exitcode = run()
gogame.AsyncStart(func() {
exitcode = run()
})
os.Exit(exitcode)
}