Print error details on IMG_Load
This commit is contained in:
1 parent
e5f5fea992
commit
43f7432cb0
1 file changed
+1
-1
+1
-1
@@ -26,7 +26,7 @@ void Sprite::LoadImage(std::string path, WorldPos image_center) {
|
||||
IMG_Load(path.c_str()), SDL_DestroySurface);
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user