diff --git a/OpenRA.Game/Support/Program.cs b/OpenRA.Game/Support/Program.cs index 1313760448..60b3333ff5 100644 --- a/OpenRA.Game/Support/Program.cs +++ b/OpenRA.Game/Support/Program.cs @@ -111,23 +111,13 @@ namespace OpenRA static RunStatus Run(string[] args) { - if (AppDomain.CurrentDomain.IsDefaultAppDomain()) - { - var name = Assembly.GetEntryAssembly().GetName(); - int retCode; - do - { - var domain = AppDomain.CreateDomain("Game"); - retCode = domain.ExecuteAssemblyByName(name, args); - AppDomain.Unload(domain); - } - while (retCode == (int)RunStatus.Restart); - return RunStatus.Success; - } - Game.Initialize(new Arguments(args)); GC.Collect(); - return Game.Run(); + var status = Game.Run(); + if (status == RunStatus.Restart) + using (var p = Process.GetCurrentProcess()) + Process.Start(Assembly.GetEntryAssembly().Location, p.StartInfo.Arguments); + return status; } } } \ No newline at end of file