瀏覽代碼

tick shader cache compilation to avoid timeouts

trethaller 6 年之前
父節點
當前提交
2266ae01bf
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      hxsl/CacheFile.hx

+ 6 - 2
hxsl/CacheFile.hx

@@ -109,12 +109,16 @@ class CacheFile extends Cache {
 		if( wait.length > 0 ) {
 			waitCount += wait.length;
 			#if hlmulti
-			for( r in wait )
+			for( r in wait ) {
 				addNewShader(r);
+				hxd.System.timeoutTick();
+			}
 			#else
 			haxe.Timer.delay(function() {
-				for( r in wait )
+				for( r in wait ) {
 					addNewShader(r);
+					hxd.System.timeoutTick();
+				}
 			},1000); // wait until engine correctly initialized
 			#end
 		}