summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-21 12:53:38 +0000
committerrubidium <rubidium@openttd.org>2011-08-21 12:53:38 +0000
commitd89ff5b27861a7cb53efd5fef7636f3dfab1ec68 (patch)
treec0b07d5e668d439d76b23cffc7ca31d049d0d98c /src/gfx.cpp
parentdc5f44883be808208befd54d05fceac38f9a6ac7 (diff)
downloadopenttd-d89ff5b27861a7cb53efd5fef7636f3dfab1ec68.tar.xz
(svn r22798) -Change: jump immediately to the next mode after scanning (if needed)
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index b8c19f9b1..88943534c 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -1565,6 +1565,12 @@ void DrawDirtyBlocks()
_realtime_tick += MODAL_PROGRESS_REDRAW_TIMEOUT;
_modal_progress_paint_mutex->BeginCritical();
_modal_progress_work_mutex->BeginCritical();
+
+ extern void SwitchToMode(SwitchMode new_mode);
+ if (_switch_mode != SM_NONE && !HasModalProgress()) {
+ SwitchToMode(_switch_mode);
+ _switch_mode = SM_NONE;
+ }
}
y = 0;