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:
committed by
Patric Stout
parent
30e69c518b
commit
0e54c32452
@@ -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);
|
||||
|
Reference in New Issue
Block a user