If GDI not set in the config, show an error to the user when Directx fails to initialize

This commit is contained in:
andres.delikat 2011-08-21 00:07:00 +00:00
parent 276c759d88
commit aea3d81834
1 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,7 @@ namespace BizHawk.MultiClient
try { Global.DSound = new DirectSound(); }
catch
{
MessageBox.Show("Couldn't initialize DirectSound!");
MessageBox.Show("Couldn't initialize DirectSound!", "Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
@ -27,6 +27,8 @@ namespace BizHawk.MultiClient
catch
{
//can fallback to GDI rendering
if (Global.Config.ForceGDI == true)
MessageBox.Show("Failure to initialize Directx, reverting to GDI rendering.", "Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Global.Config.ForceGDI = true;
}