Allow modal progress sleep to finish early on completion

This commit is contained in:
Jonathan G Rennison
2020-04-11 19:33:48 +01:00
parent e2ab622a14
commit c061675001
3 changed files with 22 additions and 1 deletions

View File

@@ -1495,7 +1495,7 @@ void DrawDirtyBlocks()
_modal_progress_work_mutex.unlock();
/* Wait a while and update _realtime_tick so we are given the rights */
if (!is_first_modal_progress_loop) CSleep(MODAL_PROGRESS_REDRAW_TIMEOUT);
if (!is_first_modal_progress_loop) SleepWhileModalProgress(MODAL_PROGRESS_REDRAW_TIMEOUT);
#if defined(__GNUC__) || defined(__clang__)
__atomic_add_fetch(&_realtime_tick, MODAL_PROGRESS_REDRAW_TIMEOUT, __ATOMIC_RELAXED);
#else