From 569ce6c7b43be52911d1a56ed43b890f5cc2d765 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 11 Feb 2021 09:35:42 +0100 Subject: [PATCH] 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. --- src/video/sdl2_v.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index fd6cf6c112..e24b31db58 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();