summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2014-07-25 22:52:31 +0200
committerBert Münnich <ber.t@posteo.de>2014-07-25 22:52:31 +0200
commit5e481912ec983be89f10cbbb21561ed7cc898027 (patch)
tree8f009c6ccf4e884d570aaa72ba63c6c72693c128 /options.c
parent9c92de858484b6bbe90252955bef5f77a80f3c45 (diff)
downloadnsxiv-5e481912ec983be89f10cbbb21561ed7cc898027.tar.zst
Revised handling of GIF animations
- New option `-a`: Play animations at startup - Ctrl-Space toggles animation for all GIF files - Infinite loop for all animations
Diffstat (limited to 'options.c')
-rw-r--r--options.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/options.c b/options.c
index 47fe21a..403785c 100644
--- a/options.c
+++ b/options.c
@@ -33,7 +33,7 @@ const options_t *options = (const options_t*) &_options;
void print_usage(void)
{
- printf("usage: sxiv [-bcfhioqrtvZ] [-G GAMMA] [-g GEOMETRY] [-n NUM] "
+ printf("usage: sxiv [-abcfhioqrtvZ] [-G GAMMA] [-g GEOMETRY] [-n NUM] "
"[-N NAME] [-S DELAY] [-s MODE] [-z ZOOM] FILES...\n");
}
@@ -55,6 +55,7 @@ void parse_options(int argc, char **argv)
_options.scalemode = SCALE_DOWN;
_options.zoom = 1.0;
+ _options.animate = false;
_options.gamma = 0;
_options.slideshow = 0;
@@ -67,11 +68,14 @@ void parse_options(int argc, char **argv)
_options.thumb_mode = false;
_options.clean_cache = false;
- while ((opt = getopt(argc, argv, "bcfG:g:hin:N:oqrS:s:tvZz:")) != -1) {
+ while ((opt = getopt(argc, argv, "abcfG:g:hin:N:oqrS:s:tvZz:")) != -1) {
switch (opt) {
case '?':
print_usage();
exit(EXIT_FAILURE);
+ case 'a':
+ _options.animate = true;
+ break;
case 'b':
_options.hide_bar = true;
break;