Преглед изворни кода

disable timeout during dx present()

ncannasse пре 8 година
родитељ
комит
7d0d1bbf93
1 измењених фајлова са 3 додато и 0 уклоњено
  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() {
 	override function present() {
+		var old = hxd.System.allowTimeout;
+		if( old ) hxd.System.allowTimeout = false;
 		Driver.present(window.vsync ? 1 : 0, None);
 		Driver.present(window.vsync ? 1 : 0, None);
+		if( old ) hxd.System.allowTimeout = true;
 	}
 	}
 
 
 	override function getDefaultDepthBuffer():h3d.mat.DepthBuffer {
 	override function getDefaultDepthBuffer():h3d.mat.DepthBuffer {