From 0a4df294f762680723b067899f870250d995eae9 Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Wed, 21 Mar 2012 21:45:00 +0100 Subject: [PATCH] Use error message box instead of a normal message box --- Vocaluxe/Lib/Draw/CDirect3D.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index f8f92646..224f8a2f 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -177,10 +177,11 @@ namespace Vocaluxe.Lib.Draw try { _Device = new Device(_D3D, _D3D.Adapters.DefaultAdapter.Adapter, DeviceType.Hardware, Handle, flags, _PresentParameters); + _Device.Dispose(); } catch (Exception e) { - MessageBox.Show("Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109"); + MessageBox.Show("Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109", "Vocaluxe", MessageBoxButtons.OK, MessageBoxIcon.Error); CLog.LogError(e.Message + " - Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109"); Environment.Exit(Environment.ExitCode); } @@ -188,7 +189,7 @@ namespace Vocaluxe.Lib.Draw { if (_Device == null || _Device.Disposed) { - MessageBox.Show("Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109"); + MessageBox.Show("Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109", "Vocaluxe", MessageBoxButtons.OK, MessageBoxIcon.Error); CLog.LogError("Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109"); Environment.Exit(Environment.ExitCode); }