better error messages upon failure
git-svn-id: svn://anubis/misc/TextureCache@190 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
8b0f852f37
commit
9b853cfb21
@ -39,11 +39,11 @@ GLuint TextureCache::loadTexture(const FileLoader::Path & path,
|
||||
if (buff.size <= 0)
|
||||
return 0;
|
||||
SDL_RWops * ops = SDL_RWFromMem(buff.data, buff.size);
|
||||
SDL_Surface * temp = IMG_Load_RW(ops, /* TODO: figure out param */ true);
|
||||
SDL_Surface * temp = IMG_Load_RW(ops, true);
|
||||
if (!temp)
|
||||
{
|
||||
cerr << "Failed to load image (" << path.fullPath
|
||||
<< ", " << path.shortPath << ")!" << endl;
|
||||
cerr << "Failed to load image ('" << path.fullPath << "', '"
|
||||
<< path.shortPath << "'): " << IMG_GetError() << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user