Print error details on IMG_Load

This commit is contained in:
Jan Mrna
2025-10-16 09:49:05 +02:00
parent e5f5fea992
commit 43f7432cb0

View File

@@ -26,7 +26,7 @@ void Sprite::LoadImage(std::string path, WorldPos image_center) {
IMG_Load(path.c_str()), SDL_DestroySurface); IMG_Load(path.c_str()), SDL_DestroySurface);
if (surface == nullptr) { if (surface == nullptr) {
LOG_ERROR("IMG_Load failed to load ", path); LOG_ERROR("IMG_Load failed: ", SDL_GetError());
throw std::runtime_error("Failed to load resources"); throw std::runtime_error("Failed to load resources");
} }