Changeset - r19873:4130677c0949
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-12-19 19:31:18
frosch@openttd.org
(svn r24828) -Change: For dedicated servers without blitter ignore the spritecache size setting and always use the minimum.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/spritecache.cpp
Show inline comments
 
@@ -842,13 +842,13 @@ void *GetRawSprite(SpriteID sprite, Spri
 

	
 

	
 
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);
 
		_allocated_sprite_cache_size = target_size;
 
		_spritecache_ptr = (MemBlock*)MallocT<byte>(_allocated_sprite_cache_size);
 
	}
0 comments (0 inline, 0 general)