mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixes color-keying after scaling bitmaps for world view display;
This commit is contained in:
parent
71bcacaa60
commit
1c6a7a923d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user