diff --git a/src/gfx.cpp b/src/gfx.cpp index b21cc93654..1032855caf 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1551,7 +1551,7 @@ void DrawDirtyBlocks() _modal_progress_work_mutex.unlock(); /* Wait a while and hope the modal gives us a bit of time to draw the GUI. */ - if (!is_first_modal_progress_loop) CSleep(MODAL_PROGRESS_REDRAW_TIMEOUT); + if (!is_first_modal_progress_loop) SleepWhileModalProgress(MODAL_PROGRESS_REDRAW_TIMEOUT); /* Modal progress thread may need blitter access while we are waiting for it. */ VideoDriver::GetInstance()->ReleaseBlitterLock();