summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2012-08-21 17:13:27 +0200
committerDaniel Friesel <derf@finalrewind.org>2012-08-21 17:13:27 +0200
commit22485fb7f08950379f2fa498bd081c1623ea8bbd (patch)
tree2e23f02aa41009e084282edde4c716d594940262
parentd1f218caad102190c6075098c306d0dac4de83ae (diff)
reload: accept float values
-rw-r--r--ChangeLog1
-rw-r--r--src/keyevents.c2
-rw-r--r--src/options.c2
-rw-r--r--src/options.h2
4 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 571e5e8..ec5c493 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@ git HEAD
** %z image zoom
* Always use file URL as filename when opening http files.
(consequence: lossless rotate no longer works for such files)
+ * --reload now accepts rational numbers
Sun, 25 Mar 2012 13:13:26 +0200 Daniel Friesel <derf@finalrewind.org>
diff --git a/src/keyevents.c b/src/keyevents.c
index 343b5d1..18853ed 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -750,7 +750,7 @@ void feh_event_handle_keypress(XEvent * ev)
if (opt.reload < SLIDESHOW_RELOAD_MAX)
opt.reload++;
else if (opt.verbose)
- weprintf("Cannot set RELOAD higher than %d seconds.", opt.reload);
+ weprintf("Cannot set RELOAD higher than %f seconds.", opt.reload);
}
else if (feh_is_kp(&keys.reload_minus, keysym, state)) {
if (opt.reload > 1)
diff --git a/src/options.c b/src/options.c
index c27e11e..6f11d07 100644
--- a/src/options.c
+++ b/src/options.c
@@ -590,7 +590,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
}
break;
case 'R':
- opt.reload = atoi(optarg);
+ opt.reload = atof(optarg);
break;
case 'a':
opt.alpha = 1;
diff --git a/src/options.h b/src/options.h
index cef4215..a763642 100644
--- a/src/options.h
+++ b/src/options.h
@@ -97,7 +97,7 @@ struct __fehoptions {
int limit_w;
int limit_h;
unsigned int thumb_redraw;
- int reload;
+ double reload;
int sort;
int debug;
int geom_flags;