summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-16 18:16:00 +0100
committerBert <ber.t@gmx.com>2011-02-16 18:16:00 +0100
commit8919204a2e666e12216240a792bfff7a391d4d43 (patch)
tree057989f1a75c90f7257cc08f118e0197c2e87cef /options.c
parent89ec18385b1d9e76463afd443b25c203a83c94cb (diff)
downloadnsxiv-8919204a2e666e12216240a792bfff7a391d4d43.tar.zst
Render thumbnails
Diffstat (limited to 'options.c')
-rw-r--r--options.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/options.c b/options.c
index 2291ded..9d53c6c 100644
--- a/options.c
+++ b/options.c
@@ -25,12 +25,13 @@
#include "config.h"
#include "options.h"
+#include "util.h"
options_t _options;
const options_t *options = (const options_t*) &_options;
void print_usage() {
- printf("usage: sxiv [-dFfhpqrstvZ] [-g GEOMETRY] [-z ZOOM] FILES...\n");
+ printf("usage: sxiv [-dFfhpqrsTtvZ] [-g GEOMETRY] [-z ZOOM] FILES...\n");
}
void print_version() {
@@ -54,7 +55,7 @@ void parse_options(int argc, char **argv) {
_options.quiet = 0;
_options.recursive = 0;
- while ((opt = getopt(argc, argv, "dFfg:hpqrstvZz:")) != -1) {
+ while ((opt = getopt(argc, argv, "dFfg:hpqrsTtvZz:")) != -1) {
switch (opt) {
case '?':
print_usage();
@@ -86,8 +87,11 @@ void parse_options(int argc, char **argv) {
case 's':
_options.scalemode = SCALE_FIT;
break;
+ case 'T':
+ _options.thumbnails = 2;
+ break;
case 't':
- _options.thumbnails = 1;
+ _options.thumbnails = MAX(_options.thumbnails, 1);
break;
case 'v':
print_version();