Changeset - r19107:4b7ff0d11293
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2012-02-23 16:23:09
rubidium@openttd.org
(svn r23978) -Fix: [SDL] Palette update was done too late making switching from 8bpp -> 32bpp look ugly
1 file changed with 16 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/video/sdl_v.cpp
Show inline comments
 
@@ -258,9 +258,23 @@ static bool CreateMainSurface(uint w, ui
 
	_screen.dst_ptr = newscreen->pixels;
 
	_sdl_screen = newscreen;
 

	
 
	BlitterFactoryBase::GetCurrentBlitter()->PostResize();
 
	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);
 
			break;
 

	
 
		default:
 
			NOT_REACHED();
 
	}
 

	
 
	snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
 
	SDL_CALL SDL_WM_SetCaption(caption, caption);
0 comments (0 inline, 0 general)