1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

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

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

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)