diff --git a/src/progressbar.c b/src/progressbar.c index ace07f861..336c62fdd 100644 --- a/src/progressbar.c +++ b/src/progressbar.c @@ -45,25 +45,25 @@ void show_progress_bar(SDL_Surface * screen) return; newtime = SDL_GetTicks(); - if (newtime > oldtime + 15) // trying not to eat some serious CPU time! - { - for (x = 0; x < screen->w; x = x + 65) + if (newtime > oldtime + 15) // trying not to eat some serious CPU time! { - src.x = 65 - (prog_bar_ctr % 65); - src.y = 0; - src.w = 65; - src.h = 24; + for (x = 0; x < screen->w; x = x + 65) + { + src.x = 65 - (prog_bar_ctr % 65); + src.y = 0; + src.w = 65; + src.h = 24; - dest.x = x; - dest.y = screen->h - 24; + dest.x = x; + dest.y = screen->h - 24; - SDL_BlitSurface(img_progress, &src, screen, &dest); + SDL_BlitSurface(img_progress, &src, screen, &dest); + } + + prog_bar_ctr++; + + SDL_UpdateRect(screen, 0, screen->h - 24, screen->w, 24); } - - prog_bar_ctr++; - - SDL_UpdateRect(screen, 0, screen->h - 24, screen->w, 24); - } oldtime = newtime;