From 82e4286c5fc39e0f0138732f364667bd754894e0 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Tue, 1 Feb 2005 16:55:11 +0000 Subject: [project @ 2005-02-01 16:55:11 by rjw] Animate broken GIFs with frame delays of 0. svn path=/import/netsurf/; revision=1480 --- image/gif.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'image/gif.c') diff --git a/image/gif.c b/image/gif.c index 43eaf8977..ca77e2b36 100644 --- a/image/gif.c +++ b/image/gif.c @@ -186,7 +186,7 @@ void nsgif_animate(void *p) /* A loop count of 0 has a special meaning of infinite */ - if (c->data.gif.gif->loop_count != 0) { + if (gif->loop_count != 0) { gif->loop_count--; if (gif->loop_count == 0) { c->data.gif.current_frame = gif->frame_count_partial - 1; @@ -197,7 +197,7 @@ void nsgif_animate(void *p) /* Continue animating if we should */ - if (c->data.gif.gif->loop_count >= 0) { + if (gif->loop_count >= 0) { delay = gif->frames[c->data.gif.current_frame].frame_delay; if (delay < option_minimum_gif_delay) delay = option_minimum_gif_delay; @@ -239,15 +239,15 @@ void nsgif_animate(void *p) } else { /* do advanced check */ if ((data.redraw.x == 0) && (data.redraw.y == 0) && - (data.redraw.width == c->data.gif.gif->width) && - (data.redraw.height == c->data.gif.gif->height)) { - data.redraw.full_redraw = !bitmap_get_opaque(c->data.gif.gif->frame_image); - } else { + (data.redraw.width == gif->width) && + (data.redraw.height == gif->height)) { + data.redraw.full_redraw = !gif->frames[f].opaque; + } else { data.redraw.full_redraw = true; data.redraw.x = 0; data.redraw.y = 0; - data.redraw.width = c->data.gif.gif->width; - data.redraw.height = c->data.gif.gif->height; + data.redraw.width = gif->width; + data.redraw.height = gif->height; } } -- cgit v1.2.3