mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
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:
parent
8e1154eb1c
commit
8ad55e23fd
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user