aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2014-08-29 20:16:24 +0200
committerBert Münnich <ber.t@posteo.de>2014-08-29 20:16:24 +0200
commitf478385d5997f7c2cd4392a4a20d69c3b57aeabb (patch)
tree32ba1c8f777f1371e44d2bb0636d7ef0f8245fe5
parent0f6cb93a0910de6e142971b81d3717c26d94e860 (diff)
Corrected i_alternate, fixes issue #171
-rw-r--r--Makefile2
-rw-r--r--main.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a00d366..e144a7d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = git-20140820
+VERSION = git-20140829
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
diff --git a/main.c b/main.c
index 821f63b..bf10088 100644
--- a/main.c
+++ b/main.c
@@ -314,14 +314,16 @@ end:
void load_image(int new)
{
+ static int current;
+
if (new < 0 || new >= filecnt)
return;
win_set_cursor(&win, CURSOR_WATCH);
reset_timeout(slideshow);
- if (new != fileidx)
- alternate = fileidx;
+ if (new != current)
+ alternate = current;
img_close(&img, false);
while (!img_load(&img, &files[new])) {
@@ -332,7 +334,7 @@ void load_image(int new)
new--;
}
files[new].loaded = true;
- fileidx = new;
+ fileidx = current = new;
info.open = false;
open_info();