mirror of https://github.com/OpenTTD/OpenTTD
(svn r23978) -Fix: [SDL] Palette update was done too late making switching from 8bpp -> 32bpp look ugly
parent
37a4acc7e0
commit
4db85fcc4d
|
@ -258,9 +258,23 @@ static bool CreateMainSurface(uint w, uint h)
|
||||||
_screen.dst_ptr = newscreen->pixels;
|
_screen.dst_ptr = newscreen->pixels;
|
||||||
_sdl_screen = newscreen;
|
_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);
|
snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
|
||||||
SDL_CALL SDL_WM_SetCaption(caption, caption);
|
SDL_CALL SDL_WM_SetCaption(caption, caption);
|
||||||
|
|
Loading…
Reference in New Issue