From 75af56d8b5e31212e19a402e9085f981aca6d1c9 Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Mon, 19 Mar 2012 18:23:16 +0100 Subject: [PATCH] Log error if device creation failed --- Vocaluxe/Lib/Draw/CDirect3D.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index 07fb2e5c..15842ce8 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -166,6 +166,9 @@ namespace Vocaluxe.Lib.Draw else flags = CreateFlags.SoftwareVertexProcessing; _Device = new Device(_D3D, _D3D.Adapters.DefaultAdapter.Adapter, DeviceType.Hardware, Handle, flags, _PresentParameters); + + if(_Device.Disposed || _D3D.Disposed || _Device == null || _D3D == null) + CLog.LogError("Something went wrong with device creating, please check if your DirectX redistributables and graficcard drivers are up to date"); this.CenterToScreen();