Changeset - r19109:91bf304afe2c
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2012-02-23 21:10:08
rubidium@openttd.org
(svn r23980) -Fix (r23977): crash when starting with the 32bpp anim blitter
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/video/sdl_v.cpp
Show inline comments
 
@@ -252,33 +252,33 @@ static bool CreateMainSurface(uint w, ui
 
	/* Delay drawing for this cycle; the next cycle will redraw the whole screen */
 
	_num_dirty_rects = 0;
 

	
 
	_screen.width = newscreen->w;
 
	_screen.height = newscreen->h;
 
	_screen.pitch = newscreen->pitch / (bpp / 8);
 
	_screen.dst_ptr = newscreen->pixels;
 
	_sdl_screen = newscreen;
 

	
 
	Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
 
	blitter->PostResize();
 

	
 
	InitPalette();
 
	switch (blitter->UsePaletteAnimation()) {
 
		case Blitter::PALETTE_ANIMATION_NONE:
 
		case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
 
			InitPalette();
 
			UpdatePalette();
 
			break;
 

	
 
		case Blitter::PALETTE_ANIMATION_BLITTER:
 
			blitter->PaletteAnimate(_local_palette);
 
			if (_video_driver != NULL) blitter->PaletteAnimate(_local_palette);
 
			break;
 

	
 
		default:
 
			NOT_REACHED();
 
	}
 

	
 
	snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
 
	SDL_CALL SDL_WM_SetCaption(caption, caption);
 

	
 
	GameSizeChanged();
 

	
 
	return true;
0 comments (0 inline, 0 general)