only show load progress every half second, otherwise we're waiting for the screen too much. Fixes #223

This commit is contained in:
Tim Felgentreff 2018-09-27 19:23:13 +00:00
parent 1e3fbd4bca
commit 73c462cb43

View file

@ -79,6 +79,12 @@ void ShowLoadProgress(const char *fmt, ...)
{
va_list va;
char temp[4096];
static unsigned int lastProgressUpdate = SDL_GetTicks();
if (SDL_GetTicks() < lastProgressUpdate + 500) {
// Only show progress updates every half second, otherwise we're waiting for the screen too much
return;
}
lastProgressUpdate = SDL_GetTicks();
va_start(va, fmt);
vsnprintf(temp, sizeof(temp) - 1, fmt, va);