1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fixes color-keying after scaling bitmaps for world view display;

This commit is contained in:
Fay 2015-02-09 20:16:42 +01:00
parent 71bcacaa60
commit 1c6a7a923d

View File

@ -1433,6 +1433,8 @@ SDL_Surface * CMapHandler::CMapCache::requestWorldViewCacheOrCreate(CMapHandler:
return cached;
auto scaled = CSDL_Ext::scaleSurfaceFast(fullSurface, fullSurface->w * scale, fullSurface->h * scale);
if (scaled->format && scaled->format->palette) // fix color keying, because SDL loses it at this point
CSDL_Ext::setColorKey(scaled, scaled->format->palette->colors[0]);
return cacheWorldViewEntry(type, key, scaled);
}