diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/options.c | 6 | ||||
-rw-r--r-- | src/slideshow.c | 4 |
2 files changed, 7 insertions, 3 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); diff --git a/src/slideshow.c b/src/slideshow.c index e3791a1..4f95c46 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -63,7 +63,7 @@ void init_slideshow_mode(void) free(s); success = 1; winwidget_show(w); - if (opt.slideshow_delay >= 0.0) + if (opt.slideshow_delay > 0.0) feh_add_timer(cb_slide_timer, w, opt.slideshow_delay, "SLIDE_CHANGE"); else if (opt.reload > 0) feh_add_unique_timer(cb_reload_timer, w, opt.reload); @@ -278,7 +278,7 @@ void slideshow_change_image(winwidget winwid, int change) if (filelist_len == 0) eprintf("No more slides in show"); - if (opt.slideshow_delay >= 0.0) + if (opt.slideshow_delay > 0.0) feh_add_timer(cb_slide_timer, winwid, opt.slideshow_delay, "SLIDE_CHANGE"); D_RETURN_(4); } |