Added safety checks for ASTC textures

This commit is contained in:
KarimAkra
2025-04-29 17:05:20 +03:00
parent e6df6d5116
commit 9307f514fe
+3 -2
View File
@@ -1161,9 +1161,10 @@ class Project extends HXProject {
// path, rename, type, embed, setDefaults
if (Path.extension(path) == 'png' && FEATURE_COMPRESSED_TEXTURES.isEnabled(this))
{
if (!isASTCExcluded(path))
final astcPath:String = "astc-textures/" + path.substr(0, path.length - 3) + "astc";
if (!isASTCExcluded(path) && FileSystem.exists(astcPath))
{
path = "astc-textures/" + path.substr(0, path.length - 3) + "astc";
path = astcPath;
if (rename != null)
rename = rename.substr(0, rename.length - 3) + "astc";