summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-11 11:19:33 +0100
committerPatric Stout <github@truebrain.nl>2021-02-11 20:23:53 +0100
commit52317bb7df6d153ec332e5403ef75cb7bc86b8f6 (patch)
treec90e6ee33227b8b74300dde6fd72bb00e07090e5 /src
parent2e1535389ac97c28ff2a4ea4fc82d057ba98aeed (diff)
downloadopenttd-52317bb7df6d153ec332e5403ef75cb7bc86b8f6.tar.xz
Change: [SDL2] Remove unneeded delay of redrawing the screen
In testing, I could find no reason why this statement is here. The comment is rather unclear (it states what it does, but not why it would be needed). This line of code was introduced with f4f40448, which gives no further insight on why it would be needed to have it here. As such, let's remove it and see if anyone else reports any problems with it. If so, this commit can be reverted and a more clear comment should be added what this line of code is dealing with (the WHY, not the WHAT).
Diffstat (limited to 'src')
-rw-r--r--src/video/sdl2_v.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp
index 49e8b4207..6beeeac5c 100644
--- a/src/video/sdl2_v.cpp
+++ b/src/video/sdl2_v.cpp
@@ -351,9 +351,6 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h, bool resize)
_sdl_surface = _sdl_real_surface;
}
- /* Delay drawing for this cycle; the next cycle will redraw the whole screen */
- _num_dirty_rects = 0;
-
_screen.width = _sdl_surface->w;
_screen.height = _sdl_surface->h;
_screen.pitch = _sdl_surface->pitch / (bpp / 8);