diff options
-rw-r--r-- | compat/assert.hpp | 1 | ||||
-rw-r--r-- | main/loader-impl.cpp | 5 | ||||
-rw-r--r-- | test/main.cpp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/compat/assert.hpp b/compat/assert.hpp index e4dd827a..099880d3 100644 --- a/compat/assert.hpp +++ b/compat/assert.hpp @@ -50,6 +50,7 @@ namespace Magnum::Examples { #define WARN(...) GAME_DEBUG_OUT("warning: ", __VA_ARGS__) #define ERR(...) GAME_DEBUG_OUT("error: ", __VA_ARGS__) +#define MESSAGE(...) GAME_DEBUG_OUT("", __VA_ARGS__) #define DEBUG(...) GAME_DEBUG_OUT("", __VA_ARGS__) } // namespace Magnum::Examples diff --git a/main/loader-impl.cpp b/main/loader-impl.cpp index 77f96672..bbf077e1 100644 --- a/main/loader-impl.cpp +++ b/main/loader-impl.cpp @@ -75,8 +75,11 @@ std::shared_ptr<tile_atlas> loader_impl::tile_atlas(Containers::StringView name, Trade::ImageData2D loader_impl::tile_texture(Containers::StringView filename) { - if(!tga_importer || !tga_importer->openFile(filename)) + if(!tga_importer || !tga_importer->openFile(filename)) { + const auto path = Utility::Path::currentDirectory(); + MESSAGE("note: current working directory: '%s'", path->data()); ABORT("can't open tile image '%s'", filename.cbegin()); + } auto img = tga_importer->image2D(0); if (!img) ABORT("can't allocate tile image for '%s'", filename.cbegin()); diff --git a/test/main.cpp b/test/main.cpp index dffb19e1..d0bf23ed 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -19,8 +19,6 @@ app::app(const Arguments& arguments): .setFlags(Platform::Sdl2Application::GLConfiguration::Flag::Debug) } { - if (auto path_opt = Utility::Path::executableLocation(); path_opt) - std::filesystem::current_path(std::string{Utility::Path::split(*path_opt).first()}); } app::~app() |