mirror of https://github.com/OpenTTD/OpenTTD
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.pull/8665/head
parent
64e2d6b672
commit
569ce6c7b4
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue