diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-09-01 20:41:27 +0200 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-09-01 20:41:33 +0200 |
commit | 2fbc21a2050d1e8e8711afce765b7d34104f45de (patch) | |
tree | 829a23443d06406aac4339fb5647fac4b24d0d77 /image.c | |
parent | 95a7496edca2f4cffcb1e01dfa351cb0a42f07c2 (diff) | |
download | nsxiv-2fbc21a2050d1e8e8711afce765b7d34104f45de.tar.zst |
Simplified img_frame_animate
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -824,21 +824,16 @@ bool img_frame_navigate(img_t *img, int d) return img_frame_goto(img, d); } -bool img_frame_animate(img_t *img, bool restart) +bool img_frame_animate(img_t *img) { if (img == NULL || img->im == NULL || img->multi.cnt == 0) return false; - if (img->multi.sel + 1 >= img->multi.cnt) { + if (img->multi.sel + 1 >= img->multi.cnt) img_frame_goto(img, 0); - img->dirty = true; - return true; - } else if (!restart) { + else img_frame_goto(img, img->multi.sel + 1); - img->dirty = true; - return true; - } else { - return false; - } + img->dirty = true; + return true; } |