瀏覽代碼

don't present before backbuffer setup

ncannasse 7 年之前
父節點
當前提交
92c9f0b1c0
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      h3d/impl/DirectXDriver.hx

+ 1 - 0
h3d/impl/DirectXDriver.hx

@@ -218,6 +218,7 @@ class DirectXDriver extends h3d.impl.Driver {
 	}
 
 	override function present() {
+		if( defaultTarget == null ) return;
 		var old = hxd.System.allowTimeout;
 		if( old ) hxd.System.allowTimeout = false;
 		Driver.present(window.vsync ? 1 : 0, None);