mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r13692) -Fix (r13674): loading PNG sprites could very quickly fill the sprite cache.
This commit is contained in:
parent
a47b118a80
commit
bb3292943a
@ -147,6 +147,8 @@ static void* ReadSprite(SpriteCache *sc, SpriteID id, bool real_sprite)
|
|||||||
sc->ptr = BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, &AllocSprite);
|
sc->ptr = BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, &AllocSprite);
|
||||||
free(sprite.data);
|
free(sprite.data);
|
||||||
|
|
||||||
|
sc->real_sprite = true;
|
||||||
|
|
||||||
return sc->ptr;
|
return sc->ptr;
|
||||||
}
|
}
|
||||||
/* If the PNG couldn't be loaded, fall back to 8bpp grfs */
|
/* If the PNG couldn't be loaded, fall back to 8bpp grfs */
|
||||||
|
Loading…
Reference in New Issue
Block a user