summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--commands.c4
-rw-r--r--image.c2
-rw-r--r--main.c10
-rw-r--r--options.c2
-rw-r--r--sxiv.16
6 files changed, 17 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 3db5ade..9caa9ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION := git-20161129
+VERSION := git-20161201
PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man
diff --git a/commands.c b/commands.c
index 7b0f457..44a6cf5 100644
--- a/commands.c
+++ b/commands.c
@@ -429,8 +429,8 @@ bool ci_slideshow(arg_t _)
{
if (prefix > 0) {
img.ss.on = true;
- img.ss.delay = prefix;
- set_timeout(slideshow, img.ss.delay * 1000, true);
+ img.ss.delay = prefix * 10;
+ set_timeout(slideshow, img.ss.delay * 100, true);
} else if (img.ss.on) {
img.ss.on = false;
reset_timeout(slideshow);
diff --git a/image.c b/image.c
index dd37207..6967b3d 100644
--- a/image.c
+++ b/image.c
@@ -76,7 +76,7 @@ void img_init(img_t *img, win_t *win)
img->gamma = MIN(MAX(options->gamma, -GAMMA_RANGE), GAMMA_RANGE);
img->ss.on = options->slideshow > 0;
- img->ss.delay = options->slideshow > 0 ? options->slideshow : SLIDESHOW_DELAY;
+ img->ss.delay = options->slideshow > 0 ? options->slideshow : SLIDESHOW_DELAY * 10;
}
#if HAVE_LIBEXIF
diff --git a/main.c b/main.c
index 131fdec..8f61ee7 100644
--- a/main.c
+++ b/main.c
@@ -371,8 +371,12 @@ void update_info(void)
bar_put(r, "%s%0*d/%d", mark, fw, fileidx + 1, filecnt);
} else {
bar_put(r, "%s", mark);
- if (img.ss.on)
- bar_put(r, "%ds | ", img.ss.delay);
+ if (img.ss.on) {
+ if (img.ss.delay % 10 != 0)
+ bar_put(r, "%2.1fs | ", (float)img.ss.delay / 10);
+ else
+ bar_put(r, "%ds | ", img.ss.delay / 10);
+ }
if (img.gamma != 0)
bar_put(r, "G%+d | ", img.gamma);
bar_put(r, "%3d%% | ", (int) (img.zoom * 100.0));
@@ -403,7 +407,7 @@ void redraw(void)
if (mode == MODE_IMAGE) {
img_render(&img);
if (img.ss.on) {
- t = img.ss.delay * 1000;
+ t = img.ss.delay * 100;
if (img.multi.cnt > 0 && img.multi.animate)
t = MAX(t, img.multi.length);
set_timeout(slideshow, t, false);
diff --git a/options.c b/options.c
index 5220330..258dc37 100644
--- a/options.c
+++ b/options.c
@@ -136,7 +136,7 @@ void parse_options(int argc, char **argv)
_options.recursive = true;
break;
case 'S':
- n = strtol(optarg, &end, 0);
+ n = strtof(optarg, &end) * 10;
if (*end != '\0' || n <= 0)
error(EXIT_FAILURE, 0, "Invalid argument for option -S: %s", optarg);
_options.slideshow = n;
diff --git a/sxiv.1 b/sxiv.1
index 56841e8..d82be81 100644
--- a/sxiv.1
+++ b/sxiv.1
@@ -87,7 +87,11 @@ Be quiet, disable warnings to standard error stream.
Search the given directories recursively for images to view.
.TP
.BI "\-S " DELAY
-Start in slideshow mode. Set the delay between images to DELAY seconds.
+Start in slideshow mode. Set the delay between images to
+.I DELAY
+seconds.
+.I DELAY
+may be a floating point number.
.TP
.BI "\-s " MODE
Set scale mode according to MODE character. Supported modes are: [d]own,