summaryrefslogtreecommitdiff
path: root/src/video/sdl2_v.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-24 12:08:37 +0100
committerPatric Stout <github@truebrain.nl>2021-01-30 21:43:59 +0100
commit30e69c518bc928bd0907c7bd8eac5f00c400f863 (patch)
tree935c076fc0eea482b6eaa41de6bad16b0c6004a4 /src/video/sdl2_v.h
parenteb80fefd1db73dcc2cfd9439749dfaea42dee89f (diff)
downloadopenttd-30e69c518bc928bd0907c7bd8eac5f00c400f863.tar.xz
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.
Diffstat (limited to 'src/video/sdl2_v.h')
-rw-r--r--src/video/sdl2_v.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/video/sdl2_v.h b/src/video/sdl2_v.h
index a72325674..d1c4d957c 100644
--- a/src/video/sdl2_v.h
+++ b/src/video/sdl2_v.h
@@ -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. */