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
@@ -167,6 +167,9 @@ namespace Vocaluxe.Lib.Draw
flags = CreateFlags.SoftwareVertexProcessing; flags = CreateFlags.SoftwareVertexProcessing;
_Device = new Device(_D3D, _D3D.Adapters.DefaultAdapter.Adapter, DeviceType.Hardware, Handle, flags, _PresentParameters); _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(); this.CenterToScreen();
//This creates a new white texture and adds it to the texture pool //This creates a new white texture and adds it to the texture pool