Codechange: [SDL2] Rework how palette is updated

It now follows more what the Win32 driver does, and has far less
exceptions and special casing.

MakePalette creates the Palette and prepares surface.
UpdatePalette updates the Palette.
CheckPaletteAnim checks if UpdatePalette needs to be called and
  marks the whole screen dirty so DrawSurfaceToScreen will do a
  full redraw.
This commit is contained in:
Patric Stout
2021-01-24 12:08:37 +01:00
committed by Patric Stout
parent eb80fefd1d
commit 30e69c518b
2 changed files with 32 additions and 48 deletions

View File

@@ -50,6 +50,7 @@ private:
void MainLoopCleanup();
bool CreateMainSurface(uint w, uint h, bool resize);
bool CreateMainWindow(uint w, uint h);
void CheckPaletteAnim();
#ifdef __EMSCRIPTEN__
/* Convert a constant pointer back to a non-constant pointer to a member function. */