- fixed several cases of accessing full path to files in archives

This commit is contained in:
Ivan Savenko committed 2013-07-29 11:38:18 +00:00
1 parent 9f7c89d5e3
commit 77496bcea9
3 files changed
+12 -15

No files matched your search

+2 -5
View File
@@ -130,13 +130,10 @@ SDL_Surface * BitmapHandler::loadBitmapFromDir(std::string path, std::string fna
}
else
{ //loading via SDL_Image
CFileInfo info(*CResourceHandler::get()->getResourceName(ResourceID(path + fname, EResType::IMAGE)));
ret = IMG_LoadTyped_RW(
ret = IMG_Load_RW(
//create SDL_RW with our data (will be deleted by SDL)
SDL_RWFromConstMem((void*)readFile.first.get(), readFile.second),
1, // mark it for auto-deleting
&info.getExtension()[0] + 1); //pass extension without dot (+1 character)
1); // mark it for auto-deleting
if (ret)
{
if (ret->format->palette)