only show load progress every half second, otherwise we're waiting for the screen too much. Fixes #223
This commit is contained in:
parent
1e3fbd4bca
commit
73c462cb43
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue