diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 19:21:08 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 19:21:08 +0200 |
commit | 61c1ed471755f0d66c0e03fbc3b0edad83b40b34 (patch) | |
tree | 54c39b86c72e0e3e740e7aa88bca0ae25466ec37 /loader | |
parent | 7c00580fa9c5a26f051439b6801c0122d23949a2 (diff) |
reduce noise when guessing texture on-disk format
Diffstat (limited to 'loader')
-rw-r--r-- | loader/loader-impl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/loader/loader-impl.cpp b/loader/loader-impl.cpp index 7c3e760c..a6d05e32 100644 --- a/loader/loader-impl.cpp +++ b/loader/loader-impl.cpp @@ -90,7 +90,7 @@ Trade::ImageData2D loader_impl::tile_texture(StringView filename_) { std::memcpy(filename + len, extension.data(), extension.size()); filename[len + extension.size()] = '\0'; - if (tga_importer->openFile(filename)) + if (Utility::Path::exists(filename) && tga_importer->openFile(filename)) { auto img = tga_importer->image2D(0); if (!img) @@ -98,11 +98,9 @@ Trade::ImageData2D loader_impl::tile_texture(StringView filename_) auto ret = std::move(*img); return ret; } - Debug{} << "failed to open" << filename << extension; } const auto path = Utility::Path::currentDirectory(); - fm_log("fatal: can't open tile image '%s' (cwd '%s')", filename, path ? path->data() : "(null)"); - std::abort(); + fm_abort("can't open tile image '%s' (cwd '%s')", filename, path ? path->data() : "(null)"); } void loader_::destroy() |