diff --git a/main.go b/main.go index 224925c..a671673 100644 --- a/main.go +++ b/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 {