ncannasse 7 éve
szülő
commit
4ab3daefc2
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      hxsl/CacheFile.hx

+ 5 - 1
hxsl/CacheFile.hx

@@ -41,6 +41,9 @@ class CacheFile extends Cache {
 		this.allowCompile = allowCompile;
 		this.recompileRT = recompileRT || allowCompile;
 		this.file = FILENAME;
+		#if usesys
+		this.file = haxe.System.dataPathPrefix + this.file;
+		#end
 		sourceFile = this.file + "." + getPlatformTag();
 		load();
 	}
@@ -83,7 +86,8 @@ class CacheFile extends Cache {
 				save();
 			}
 			log(runtimeShaders.length+" shaders loaded in "+hxd.Math.fmt(haxe.Timer.stamp() - t0)+"s");
-		}
+		} else if( !allowCompile )
+			throw "Missing " + file;
 		if( linkCache.linked == null )
 			linkCache.linked = link(makeDefaultShader());
 		isLoading = false;