summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-24 12:23:09 +0100
committerPatric Stout <github@truebrain.nl>2021-01-30 21:43:59 +0100
commit0e54c32452767edb46dc442ae1b88468494c6662 (patch)
treebd2bbfff5e840b58f7f1d85ea2f481c84b72f653
parent30e69c518bc928bd0907c7bd8eac5f00c400f863 (diff)
downloadopenttd-0e54c32452767edb46dc442ae1b88468494c6662.tar.xz
Codechange: [SDL2] Use MakeDirty() to force a redraw
The original code is "strictly correct", but just reads really weird, and we use MakeDirty() in several other places instead too.
-rw-r--r--src/video/sdl2_v.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp
index 28ce0f880..aa7a23c72 100644
--- a/src/video/sdl2_v.cpp
+++ b/src/video/sdl2_v.cpp
@@ -655,7 +655,7 @@ int VideoDriver_SDL::PollEvent()
case SDL_WINDOWEVENT: {
if (ev.window.event == SDL_WINDOWEVENT_EXPOSED) {
// Force a redraw of the entire screen.
- _num_dirty_rects = MAX_DIRTY_RECTS + 1;
+ this->MakeDirty(0, 0, _screen.width, _screen.height);
} else if (ev.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
int w = std::max(ev.window.data1, 64);
int h = std::max(ev.window.data2, 64);