mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-07 12:59:43 +01:00
(svn r23978) -Fix: [SDL] Palette update was done too late making switching from 8bpp -> 32bpp look ugly
This commit is contained in:
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();
|
||||||
|
|
||||||
|
switch (blitter->UsePaletteAnimation()) {
|
||||||
|
case Blitter::PALETTE_ANIMATION_NONE:
|
||||||
|
case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
|
||||||
InitPalette();
|
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
Block a user