From 1490b52a6b96b6a69a0c4fe9e0515dc717425128 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 22 Mar 2012 09:34:34 +0000 Subject: NetSurf options rework (a=vince r=daniels,jmb) svn path=/trunk/netsurf/; revision=13548 --- image/gif.c | 12 +++++++----- image/mng.c | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'image') diff --git a/image/gif.c b/image/gif.c index 8cb89c7d7..d92eede85 100644 --- a/image/gif.c +++ b/image/gif.c @@ -158,14 +158,15 @@ static void nsgif_animate(void *p) /* Continue animating if we should */ if (gif->gif->loop_count >= 0) { delay = gif->gif->frames[gif->current_frame].frame_delay; - if (delay < option_minimum_gif_delay) - delay = option_minimum_gif_delay; + if (delay < nsoption_int(minimum_gif_delay)) + delay = nsoption_int(minimum_gif_delay); schedule(delay, nsgif_animate, gif); } - if ((!option_animate_images) || - (!gif->gif->frames[gif->current_frame].display)) + if ((!nsoption_bool(animate_images)) || + (!gif->gif->frames[gif->current_frame].display)) { return; + } /* area within gif to redraw */ f = gif->current_frame; @@ -319,8 +320,9 @@ static gif_result nsgif_get_frame(nsgif_content *gif) gif_result res = GIF_OK; current_frame = gif->current_frame; - if (!option_animate_images) + if (!nsoption_bool(animate_images)) { current_frame = 0; + } if (current_frame < gif->gif->decoded_frame) previous_frame = 0; diff --git a/image/mng.c b/image/mng.c index 32e3a2f75..8d9769b70 100644 --- a/image/mng.c +++ b/image/mng.c @@ -712,8 +712,10 @@ static bool nsmng_redraw(struct content *c, struct content_redraw_data *data, mng->bitmap, data->background_colour, flags); /* Check if we need to restart the animation */ - if ((mng->waiting) && (option_animate_images)) + if ((mng->waiting) && + (nsoption_bool(animate_images))) { nsmng_animate(c); + } return ret; } -- cgit v1.2.3