summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-05-10 22:53:36 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-05-10 22:53:36 +0000
commit924fe5c99587d3af5ac0b799e131f17a3db8f597 (patch)
tree6f177717eddfe36afde6a928ee9d6607ae86c630
parent47ab606edf911cb376941ab5616d331b017bfe11 (diff)
downloadnetsurf-924fe5c99587d3af5ac0b799e131f17a3db8f597.tar.gz
netsurf-924fe5c99587d3af5ac0b799e131f17a3db8f597.tar.bz2
[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
-rw-r--r--riscos/gif.c5
1 files 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;
}
}