small fixes

This commit is contained in:
MihailRis 2026-01-28 19:25:45 +03:00
parent 6afb5c8c0f
commit 1cf4fb8703
2 changed files with 9 additions and 5 deletions

View file

@ -327,10 +327,14 @@ bool AssetsLoader::loadExternalTexture(
return true;
}
for (auto& path : alternatives) {
logger.info() << (path.string() + ".png");
if (io::exists(path.string() + ".png")) {
loader.add(AssetType::TEXTURE, path.string(), name, nullptr);
return true; // TODO: fallbacks support
if (io::exists(path)) {
loader.add(
AssetType::TEXTURE,
(path.parent() / path.stem()).string(),
name,
nullptr
);
return true;
}
}
return false;