Log error if device creation failed

This commit is contained in:
Stephan Sundermann committed 2012-03-21 15:22:31 +01:00
1 parent fc0dd193ba
commit 75af56d8b5
1 file changed
+3
+3
View File
@@ -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();