diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2004-05-10 22:53:36 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2004-05-10 22:53:36 +0000 |
commit | 924fe5c99587d3af5ac0b799e131f17a3db8f597 (patch) | |
tree | 6f177717eddfe36afde6a928ee9d6607ae86c630 /riscos/gif.c | |
parent | 47ab606edf911cb376941ab5616d331b017bfe11 (diff) | |
download | netsurf-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
Diffstat (limited to 'riscos/gif.c')
-rw-r--r-- | riscos/gif.c | 5 |
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; } } |