Introduce new OpenRA.exe entrypoint and change OpenRA.Game to a library.
This commit is contained in:
@@ -21,26 +21,4 @@ namespace OpenRA
|
||||
Success = 0,
|
||||
Running = int.MaxValue
|
||||
}
|
||||
|
||||
static class Program
|
||||
{
|
||||
[STAThread]
|
||||
static int Main(string[] args)
|
||||
{
|
||||
if (Debugger.IsAttached || args.Contains("--just-die"))
|
||||
return (int)Game.InitializeAndRun(args);
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += (_, e) => ExceptionHandler.HandleFatalError((Exception)e.ExceptionObject);
|
||||
|
||||
try
|
||||
{
|
||||
return (int)Game.InitializeAndRun(args);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ExceptionHandler.HandleFatalError(e);
|
||||
return (int)RunStatus.Error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user