mirror of https://github.com/OpenTTD/OpenTTD
(svn r13692) -Fix (r13674): loading PNG sprites could very quickly fill the sprite cache.
parent
447ec39f49
commit
56379fff51
|
@ -147,6 +147,8 @@ static void* ReadSprite(SpriteCache *sc, SpriteID id, bool real_sprite)
|
|||
sc->ptr = BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, &AllocSprite);
|
||||
free(sprite.data);
|
||||
|
||||
sc->real_sprite = true;
|
||||
|
||||
return sc->ptr;
|
||||
}
|
||||
/* If the PNG couldn't be loaded, fall back to 8bpp grfs */
|
||||
|
|
Loading…
Reference in New Issue