diff options
author | Bert <ber.t@gmx.com> | 2011-09-10 18:41:20 +0200 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-09-10 18:41:20 +0200 |
commit | 510512714df01110cf42cb2a11d944f55297c5cc (patch) | |
tree | 38a7393df90254e9d89e80c37c9ae4a16eb58b6b /image.c | |
parent | 79d780a701e47ea1aacf49728e28900bb2b17743 (diff) |
Added slideshow support
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -56,6 +56,8 @@ void img_init(img_t *img, win_t *win) { img->zoom = MIN(img->zoom, zoom_max); img->aa = options->aa; img->alpha = 1; + img->slideshow = 0; + img->ss_delay = SLIDESHOW_DELAY * 1000; } if (win) { @@ -651,7 +653,7 @@ int img_frame_animate(img_t *img, int restart) { return 0; if (img->multi.sel + 1 >= img->multi.cnt) { - if (restart || GIF_LOOP) { + if (restart || (GIF_LOOP && !img->slideshow)) { img_frame_goto(img, 0); } else { img->multi.animate = 0; @@ -660,7 +662,6 @@ int img_frame_animate(img_t *img, int restart) { } else if (!restart) { img_frame_goto(img, img->multi.sel + 1); } - img->multi.animate = 1; return img->multi.frames[img->multi.sel].delay; |