static void RunInternal(string[] args) { using (MySteamService steamService = new MySteamService(MySandboxGame.IsDedicated, AppId)) { IMyRender renderer = null; if (MySandboxGame.IsDedicated) { renderer = new MyNullRender(); } else if (!MyFakes.ENABLE_DX11_RENDERER) { renderer = new MyDX9Render(); } else if (MyFakes.ENABLE_DX11_RENDERER) { renderer = new MyDX11Render(); } VRageRender.MyRenderProxy.Initialize(renderer); VRageRender.MyRenderProxy.IS_OFFICIAL = MyFinalBuildConstants.IS_OFFICIAL; VRageRender.MyRenderProxy.GetRenderProfiler().SetAutocommit(false); VRageRender.MyRenderProxy.GetRenderProfiler().InitMemoryHack("MainEntryPoint"); VRageRender.MyRenderProxy.GetRenderProfiler().StartProfilingBlock("MyProgram.Init"); VRageRender.MyRenderProxy.GetRenderProfiler().StartProfilingBlock("MySteam.Init()"); if (!MySandboxGame.IsDedicated) { if (steamService.IsActive) { steamService.SetNotificationPosition(MySteamService.NotificationPosition.TopLeft); MySandboxGame.Log.WriteLineAndConsole("Steam.IsActive: " + steamService.IsActive); MySandboxGame.Log.WriteLineAndConsole("Steam.IsOnline: " + steamService.IsOnline); MySandboxGame.Log.WriteLineAndConsole("Steam.OwnsGame: " + steamService.OwnsGame); MySandboxGame.Log.WriteLineAndConsole("Steam.UserId: " + steamService.UserId); MySandboxGame.Log.WriteLineAndConsole("Steam.UserName: "******"[n/a]"); MySandboxGame.Log.WriteLineAndConsole("Steam.Branch: " + steamService.BranchName ?? "[n/a]"); MySandboxGame.Log.WriteLineAndConsole("Build date: " + MySandboxGame.BuildDateTime.ToString("yyyy-MM-dd hh:mm", CultureInfo.InvariantCulture)); MySandboxGame.Log.WriteLineAndConsole("Build version: " + MySandboxGame.BuildVersion.ToString()); } else if (MyFinalBuildConstants.IS_OFFICIAL) //We dont need Steam only in VS { if (!(steamService.IsActive && steamService.OwnsGame)) { MessageBoxWrapper("Steam is not running!", "Please run this game from Steam." + Environment.NewLine + "(restart Steam if already running)"); return; } } else { if (!(steamService.IsActive && steamService.OwnsGame)) { MessageBoxWrapper("Steam is not running!", "Game might be unstable when run without Steam!"); } } } VRageRender.MyRenderProxy.GetRenderProfiler().EndProfilingBlock(); VRageRender.MyRenderProxy.GetRenderProfiler().StartProfilingBlock("new MySandboxGame()"); SpaceEngineersGame.SetupPerGameSettings(); VRageGameServices services = new VRageGameServices(steamService); if (!MySandboxGame.IsDedicated) MyFileSystem.InitUserSpecific(steamService.UserId.ToString()); using (MySandboxGame game = new MySandboxGame(services, args)) { VRageRender.MyRenderProxy.GetRenderProfiler().EndProfilingBlock(); VRageRender.MyRenderProxy.GetRenderProfiler().EndProfilingBlock(); game.Run(disposeSplashScreen: DisposeSplashScreen); } } }