1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 19:49:10 +00:00

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.
This commit is contained in:
Patric Stout
2021-01-24 12:23:09 +01:00
committed by Patric Stout
parent 30e69c518b
commit 0e54c32452

View File

@@ -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);