浏览代码

Merge pull request #85 from Fayth/mantis-2053

Let's see, thanks :)
DjWarmonger 10 年之前
父节点
当前提交
33947d7c38
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      client/mapHandler.cpp

+ 2 - 0
client/mapHandler.cpp

@@ -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);
 }