From 924fe5c99587d3af5ac0b799e131f17a3db8f597 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Mon, 10 May 2004 22:53:36 +0000 Subject: [project @ 2004-05-10 22:53:36 by rjw] Animations with a limited number of loops now stop on the last frame rather than the first. svn path=/import/netsurf/; revision=850 --- riscos/gif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/riscos/gif.c b/riscos/gif.c index 9065da2bb..e71cdf471 100644 --- a/riscos/gif.c +++ b/riscos/gif.c @@ -161,18 +161,19 @@ void nsgif_animate(void *p) { struct content *c = p; union content_msg_data data; - + /* Advance by a frame, updating the loop count accordingly */ c->data.gif.current_frame++; if (c->data.gif.current_frame == c->data.gif.gif->frame_count) { c->data.gif.current_frame = 0; - + /* A loop count of 0 has a special meaning of infinite */ if (c->data.gif.gif->loop_count != 0) { c->data.gif.gif->loop_count--; if (c->data.gif.gif->loop_count == 0) { + c->data.gif.current_frame = c->data.gif.gif->frame_count - 1; c->data.gif.gif->loop_count = -1; } } -- cgit v1.2.3