summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
Diffstat (limited to 'image')
-rw-r--r--image/gif.c12
-rw-r--r--image/mng.c4
2 files changed, 10 insertions, 6 deletions
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;
}