diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-11 09:35:42 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-02-11 20:23:53 +0100 |
commit | 569ce6c7b43be52911d1a56ed43b890f5cc2d765 (patch) | |
tree | 32ec77d986f82d9838da2dc96f67abebe5f42097 | |
parent | 64e2d6b6720ae16ba17a6b730e0319d267e07756 (diff) | |
download | openttd-569ce6c7b43be52911d1a56ed43b890f5cc2d765.tar.xz |
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.
-rw-r--r-- | src/video/sdl2_v.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index fd6cf6c11..e24b31db5 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -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(); |