summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-03-01 23:17:30 +0100
committerGitHub <noreply@github.com>2021-03-01 23:17:30 +0100
commitabac4b17588688d0b8241a303104c39ca92a87e8 (patch)
tree037c01e7e391dc19564cc7610d09f92f2aee186e
parent47e899cf7532f29acfe479c77a1d02f4fdd288ef (diff)
downloadopenttd-abac4b17588688d0b8241a303104c39ca92a87e8.tar.xz
Fix c4df0f95: bootstrap was only showing a black screen (#8788)
The bootstrap has the _switch_mode to SM_MENU, and never leaves this mode. Neither is it considered a modal window (while in some sense it really is). So .. we need to add another "draw anyway" exception, to make sure bootstrap is being drawn.
-rw-r--r--src/video/video_driver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/video_driver.cpp b/src/video/video_driver.cpp
index bcd646abd..5e2518435 100644
--- a/src/video/video_driver.cpp
+++ b/src/video/video_driver.cpp
@@ -41,7 +41,7 @@ bool VideoDriver::Tick()
}
/* Prevent drawing when switching mode, as windows can be removed when they should still appear. */
- if (this->HasGUI() && cur_ticks >= this->next_draw_tick && (_switch_mode == SM_NONE || HasModalProgress())) {
+ if (this->HasGUI() && cur_ticks >= this->next_draw_tick && (_switch_mode == SM_NONE || _game_mode == GM_BOOTSTRAP || HasModalProgress())) {
this->next_draw_tick += this->GetDrawInterval();
/* Avoid next_draw_tick getting behind more and more if it cannot keep up. */
if (this->next_draw_tick < cur_ticks - ALLOWED_DRIFT * this->GetDrawInterval()) this->next_draw_tick = cur_ticks;