summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-19 19:31:18 +0000
committerfrosch <frosch@openttd.org>2012-12-19 19:31:18 +0000
commite428952110f0a7c64bdd9616f8d7a5f61345d441 (patch)
treef8af923a957f38892efc851c3e3de1ee45d8d085
parent5e7f979375427ea310353386a19b849672547dcd (diff)
downloadopenttd-e428952110f0a7c64bdd9616f8d7a5f61345d441.tar.xz
(svn r24828) -Change: For dedicated servers without blitter ignore the spritecache size setting and always use the minimum.
-rw-r--r--src/spritecache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spritecache.cpp b/src/spritecache.cpp
index 202f2f028..cf09853d1 100644
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -845,7 +845,7 @@ static void GfxInitSpriteCache()
{
/* initialize sprite cache heap */
int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
- uint target_size = _sprite_cache_size * 1024 * 1024 * max(1, bpp / 8);
+ uint target_size = (bpp > 0 ? _sprite_cache_size * bpp / 8 : 1) * 1024 * 1024;
if (_spritecache_ptr == NULL || _allocated_sprite_cache_size != target_size) {
free(_spritecache_ptr);