summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-07 12:14:00 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-07 12:17:07 +0200
commit9087479e3fc31e26cf7629138010be4c877517fa (patch)
tree606776b38ba6664cd736fd422b90dfb841cc1c0a /src/options.c
parente264613a4ac1b7be3d5ab265a3041f57a709750f (diff)
Allow specifying slideshow-delay while starting the slideshow in paused mode
Set --slideshow-delay to a negative value to achieve that. In that case, the actual slideshow-delay will be <value> * (-1), so -D-5 sets slideshow-delay 5 seconds but starts paused. Closes: GH-4 <http://github.com/derf/feh/issues#issue/4>
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 3cc4bd9..e7524f4 100644
--- a/src/options.c
+++ b/src/options.c
@@ -49,7 +49,7 @@ void init_parse_options(int argc, char **argv)
memset(&opt, 0, sizeof(fehoptions));
opt.display = 1;
opt.aspect = 1;
- opt.slideshow_delay = -1.0;
+ opt.slideshow_delay = 0.0;
opt.thumb_w = 60;
opt.thumb_h = 60;
opt.thumb_redraw = 10;
@@ -597,6 +597,10 @@ static void feh_parse_option_array(int argc, char **argv)
break;
case 'D':
opt.slideshow_delay = atof(optarg);
+ if (opt.slideshow_delay < 0.0) {
+ opt.slideshow_delay *= (-1);
+ opt.paused = 1;
+ }
break;
case 'R':
opt.reload = atoi(optarg);