diff options
author | glx <glx@openttd.org> | 2019-01-25 21:22:49 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-01-25 22:09:27 +0000 |
commit | e76fd99c472237125f03d46ed7bff915e2d6a20b (patch) | |
tree | 6f04aac9d8f7f311c6f156b650b70748fff47480 /src | |
parent | 9fa827ed78d33805dbb8536019d0268fe243592e (diff) | |
download | openttd-e76fd99c472237125f03d46ed7bff915e2d6a20b.tar.xz |
Fix #7007: deadlock when launched with -n switch
Diffstat (limited to 'src')
-rw-r--r-- | src/gfx.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp index 605ff7664..85cd3bfb5 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1317,7 +1317,11 @@ void DrawDirtyBlocks() /* Wait a while and update _realtime_tick so we are given the rights */ if (!IsFirstModalProgressLoop()) CSleep(MODAL_PROGRESS_REDRAW_TIMEOUT); _realtime_tick += MODAL_PROGRESS_REDRAW_TIMEOUT; + + /* Modal progress thread may need blitter access while we are waiting for it. */ + VideoDriver::GetInstance()->ReleaseBlitterLock(); _modal_progress_paint_mutex->BeginCritical(); + VideoDriver::GetInstance()->AcquireBlitterLock(); _modal_progress_work_mutex->BeginCritical(); /* When we ended with the modal progress, do not draw the blocks. |