Print SDL error when texture load fails

This commit is contained in:
Adrian Hedqvist 2017-09-17 21:14:24 +02:00
parent c4997823ed
commit ec3be3c285

View file

@ -260,7 +260,7 @@ Texture * Renderer::LoadTexture(std::string path) {
return &textures[path]; return &textures[path];
} }
else { else {
SDL_Log("Error: Could not load texture \"%s\"\n", path.c_str()); SDL_Log("Error: Could not load texture \"%s\"\n\t%s\n", path.c_str(), SDL_GetError());
return nullptr; return nullptr;
} }
} }