diff options
Diffstat (limited to 'src/video/sdl2_v.cpp')
-rw-r--r-- | src/video/sdl2_v.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 4170a953c..bdfdbdaf1 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -792,7 +792,8 @@ void VideoDriver_SDL::LoopOnce() if (_draw_mutex != nullptr) draw_lock.lock(); } - if (cur_ticks >= next_draw_tick) { + /* Prevent drawing when switching mode, as windows can be removed when they should still appear. */ + if (cur_ticks >= next_draw_tick && (_switch_mode == SM_NONE || HasModalProgress())) { next_draw_tick += this->GetDrawInterval(); /* Avoid next_draw_tick getting behind more and more if it cannot keep up. */ if (next_draw_tick < cur_ticks - ALLOWED_DRIFT * this->GetDrawInterval()) next_draw_tick = cur_ticks; |