Browse Source

disable timeout during dx present()

ncannasse 8 years ago
parent
commit
7d0d1bbf93
1 changed files with 3 additions and 0 deletions
  1. 3 0
      h3d/impl/DirectXDriver.hx

+ 3 - 0
h3d/impl/DirectXDriver.hx

@@ -198,7 +198,10 @@ class DirectXDriver extends h3d.impl.Driver {
 	}
 
 	override function present() {
+		var old = hxd.System.allowTimeout;
+		if( old ) hxd.System.allowTimeout = false;
 		Driver.present(window.vsync ? 1 : 0, None);
+		if( old ) hxd.System.allowTimeout = true;
 	}
 
 	override function getDefaultDepthBuffer():h3d.mat.DepthBuffer {