Close game interface before showing crash form and don't show it at all on dedicated servers.
This commit is contained in:
@@ -58,6 +58,8 @@ namespace OpenRA.FileFormats.Graphics
|
|||||||
void DisableDepthBuffer();
|
void DisableDepthBuffer();
|
||||||
|
|
||||||
void SetBlendMode(BlendMode mode);
|
void SetBlendMode(BlendMode mode);
|
||||||
|
|
||||||
|
void Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IVertexBuffer<T>
|
public interface IVertexBuffer<T>
|
||||||
|
|||||||
@@ -50,9 +50,12 @@ namespace OpenRA
|
|||||||
Log.Write("exception", "{0}", rpt);
|
Log.Write("exception", "{0}", rpt);
|
||||||
Console.Error.WriteLine(rpt);
|
Console.Error.WriteLine(rpt);
|
||||||
|
|
||||||
if (Game.Settings.Debug.ShowFatalErrorDialog)
|
if (Game.Settings.Debug.ShowFatalErrorDialog && !Game.Settings.Server.Dedicated)
|
||||||
|
{
|
||||||
|
Game.Renderer.Device.Quit();
|
||||||
FatalErrorDialog.Show();
|
FatalErrorDialog.Show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static StringBuilder BuildExceptionReport(Exception e)
|
static StringBuilder BuildExceptionReport(Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ namespace OpenRA.Renderer.Cg
|
|||||||
FragmentProfile = CgGl.cgGLGetLatestProfile(CgGl.CG_GL_FRAGMENT);
|
FragmentProfile = CgGl.cgGLGetLatestProfile(CgGl.CG_GL_FRAGMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Quit()
|
||||||
|
{
|
||||||
|
Tao.Cg.Cg.cgDestroyContext(Context);
|
||||||
|
base.Quit();
|
||||||
|
}
|
||||||
|
|
||||||
public override IShader CreateShader(string name) { return new Shader(this, name); }
|
public override IShader CreateShader(string name) { return new Shader(this, name); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ namespace OpenRA.Renderer.Null
|
|||||||
WindowSize = size;
|
WindowSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Quit() { }
|
||||||
|
|
||||||
public void EnableScissor(int left, int top, int width, int height) { }
|
public void EnableScissor(int left, int top, int width, int height) { }
|
||||||
public void DisableScissor() { }
|
public void DisableScissor() { }
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,11 @@ namespace OpenRA.Renderer.SdlCommon
|
|||||||
return surf;
|
return surf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void Quit()
|
||||||
|
{
|
||||||
|
Sdl.SDL_Quit();
|
||||||
|
}
|
||||||
|
|
||||||
int ModeFromPrimitiveType(PrimitiveType pt)
|
int ModeFromPrimitiveType(PrimitiveType pt)
|
||||||
{
|
{
|
||||||
switch (pt)
|
switch (pt)
|
||||||
|
|||||||
Reference in New Issue
Block a user