aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-16 16:47:12 +0100
committerBert <ber.t@gmx.com>2011-02-16 16:47:12 +0100
commit7b497406136dabcce280bae3886a88ee77ebc1e7 (patch)
treeec183d7ff703de99d5f3e9eb1b65c0d11a046774 /main.c
parente8ed491ba9f2fe6df8f071e7c59e0174bb307a1b (diff)
downloadnsxiv-7b497406136dabcce280bae3886a88ee77ebc1e7.tar.zst
First things for thumbnail mode
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9e5965b..c680bef 100644
--- a/main.c
+++ b/main.c
@@ -46,6 +46,8 @@ const char **filenames;
int filecnt, fileidx;
size_t filesize;
+thumb_t *thumbs;
+
#define TITLE_LEN 256
char win_title[TITLE_LEN];
@@ -119,6 +121,12 @@ int main(int argc, char **argv) {
win_open(&win);
img_init(&img, &win);
+ if (options->thumbnails) {
+ thumbs = (thumb_t*) s_malloc(filecnt * sizeof(thumb_t));
+ for (i = 0; i < filecnt; ++i)
+ img_load_thumb(&thumbs[i], filenames[i]);
+ }
+
load_image();
img_render(&img, &win);
update_title();