gif: Change how we rate-limit frames to match other browsers.

This makes the old minimum_gif_delay option unused.
This commit is contained in:
Michael Drake 2019-11-11 21:49:41 +00:00
parent 8e1154eb1c
commit 8ad55e23fd

View File

@ -154,8 +154,10 @@ static void nsgif_animate(void *p)
/* Continue animating if we should */
if (gif->gif->loop_count >= 0) {
delay = gif->gif->frames[gif->current_frame].frame_delay;
if (delay < nsoption_int(minimum_gif_delay))
delay = nsoption_int(minimum_gif_delay);
if (delay <= 1) {
/* Assuming too fast to be intended, set default. */
delay = 10;
}
guit->misc->schedule(delay * 10, nsgif_animate, gif);
}