Add support for headless
This commit is contained in:
parent
0ba96ca478
commit
0a42b24f09
7
main.go
7
main.go
@ -159,14 +159,17 @@ var worldLock sync.Mutex
|
||||
var totalRenderTime, totalGameLogicCatchUp, totalNormalGameLogic, totalTicking, totalScalingTime, totalRemotePlayerUpdate, tickCount, totalFrameTime, frameCount uint64
|
||||
|
||||
func main() {
|
||||
initializeSDL()
|
||||
defer sdl.Quit()
|
||||
configX, err := loadOrCreateConfig("config.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
serverConfig = configX.ServerConfig
|
||||
config = configX
|
||||
|
||||
if !(config.Server && !config.DoKeymapPlayer && !config.DoJoyStickPlayers && !config.DoAllKeymapsPlayers && !config.MapWindow) {
|
||||
initializeSDL()
|
||||
defer sdl.Quit()
|
||||
}
|
||||
if config.ProfilerOn {
|
||||
f, err := os.Create("cpuprofile")
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user