summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-12 14:03:36 +0000
committerrubidium <rubidium@openttd.org>2008-07-12 14:03:36 +0000
commit56379fff5192b3dfb1d70b77800930a9bd6ecff5 (patch)
tree2bcbaa1ba49aa2cabc096c627e6be7f8e2d54e4b /src
parent447ec39f49e89689dc9070fe88c8eafc39a60fbe (diff)
downloadopenttd-56379fff5192b3dfb1d70b77800930a9bd6ecff5.tar.xz
(svn r13692) -Fix (r13674): loading PNG sprites could very quickly fill the sprite cache.
Diffstat (limited to 'src')
-rw-r--r--src/spritecache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/spritecache.cpp b/src/spritecache.cpp
index 811d5b5a6..0c5e1748d 100644
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -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 */