From 9b853cfb219bb50121cda27076b57122c2a23415 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 19 Oct 2009 15:54:58 +0000 Subject: [PATCH] better error messages upon failure git-svn-id: svn://anubis/misc/TextureCache@190 bd8a9e45-a331-0410-811e-c64571078777 --- TextureCache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TextureCache.cc b/TextureCache.cc index 4afe9ba..d41e681 100644 --- a/TextureCache.cc +++ b/TextureCache.cc @@ -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; }