summaryrefslogtreecommitdiff
path: root/riscos/gif.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-05-24 20:50:57 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-05-24 20:50:57 +0000
commit1d7517629358ebc946532306497843a7ff7806b8 (patch)
tree1718f786215466cab9e47d2de55f14c540c335c0 /riscos/gif.c
parentb28605cd5faa64b5bc4ac302c26a488b3cf547bf (diff)
downloadnetsurf-1d7517629358ebc946532306497843a7ff7806b8.tar.gz
netsurf-1d7517629358ebc946532306497843a7ff7806b8.tar.bz2
[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
Diffstat (limited to 'riscos/gif.c')
-rw-r--r--riscos/gif.c7
1 files changed, 5 insertions, 2 deletions
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);
}