Skip to content

Commit

Permalink
Update progress bar on 5% increments.
Browse files Browse the repository at this point in the history
Smoother, and still fast.
  • Loading branch information
hsanjuan committed May 22, 2020
1 parent 37f45d5 commit cc7ac06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,9 @@ int SARLoadProgressCB(void *ptr, long pos, long size)
gw_display_struct *display;
sar_progress_cb_struct *cb_data = SAR_PROGRESS_CB(ptr);

// Update progress in 10% increments. Otherwise the progress bar
// is updated so much that it makes loading itself 10x longer.
if ((pos % (size / 10)) != 0)
// Update progress in 5% increments. Otherwise the progress bar
// is updated so much that it makes loading itself much longer.
if ((pos % (size / 20)) != 0)
return(0);

if(cb_data == NULL)
Expand Down

0 comments on commit cc7ac06

Please sign in to comment.