Mercurial > hg > openttd
changeset 19895:4095969c5ad8 draft
(svn r24828) -Change: For dedicated servers without blitter ignore the spritecache size setting and always use the minimum.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 19 Dec 2012 19:31:18 +0000 |
parents | 4636f2d95466 |
children | 22a5e4c832eb |
files | src/spritecache.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -845,7 +845,7 @@ { /* 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);