1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-01 10:59:12 +00:00

Fix 30e69c51: palette was not marked dirty when creating a new

This means the code depended that the caller did this for us
before MakePalette() is executed, which is neither a
requirement nor a promise the code makes.
This commit is contained in:
Patric Stout
2021-02-11 09:35:42 +01:00
committed by Patric Stout
parent 64e2d6b672
commit 569ce6c7b4

View File

@@ -95,6 +95,8 @@ static void MakePalette()
if (_sdl_palette == nullptr) usererror("SDL2: Couldn't allocate palette: %s", SDL_GetError());
}
_cur_palette.first_dirty = 0;
_cur_palette.count_dirty = 256;
_local_palette = _cur_palette;
UpdatePalette();