From 1d7517629358ebc946532306497843a7ff7806b8 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Mon, 24 May 2004 20:50:57 +0000 Subject: [project @ 2004-05-24 20:50:57 by rjw] Added option for maximum GIF animation speed (currently defaults to 10cs). Fix for scaled animations not being correctly updated due to rounding issues. svn path=/import/netsurf/; revision=895 --- riscos/gif.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'riscos/gif.c') diff --git a/riscos/gif.c b/riscos/gif.c index e71cdf471..0e7185634 100644 --- a/riscos/gif.c +++ b/riscos/gif.c @@ -161,6 +161,7 @@ void nsgif_animate(void *p) { struct content *c = p; union content_msg_data data; + int delay; /* Advance by a frame, updating the loop count accordingly */ @@ -183,8 +184,9 @@ void nsgif_animate(void *p) /* Continue animating if we should */ if (c->data.gif.gif->loop_count >= 0) { - schedule(c->data.gif.gif->frames[c->data.gif.current_frame].frame_delay, - nsgif_animate, c); + delay = c->data.gif.gif->frames[c->data.gif.current_frame].frame_delay; + if (delay < option_minimum_gif_delay) delay = option_minimum_gif_delay; + schedule(delay, nsgif_animate, c); } /* area within gif to redraw */ @@ -203,6 +205,7 @@ void nsgif_animate(void *p) data.redraw.object_y = 0; data.redraw.object_width = c->width; data.redraw.object_height = c->height; + content_broadcast(c, CONTENT_MSG_REDRAW, data); } -- cgit v1.2.3