ncannasse преди 8 години
родител
ревизия
00c1b5c3db
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      h3d/impl/DirectXDriver.hx

+ 6 - 1
h3d/impl/DirectXDriver.hx

@@ -109,7 +109,12 @@ class DirectXDriver extends h3d.impl.Driver {
 		#if debug
 		options |= DebugLayer;
 		#end
-		driver = Driver.create(window, backBufferFormat, options);
+
+		try
+			driver = Driver.create(window, backBufferFormat, options)
+		catch( e : Dynamic )
+			throw "Failed to initialize DirectX driver (" + e+")";
+
 		if( driver == null ) throw "Failed to initialize DirectX driver";
 
 		var version = Driver.getSupportedVersion();