Krolyxon
Commit f478385

Branches

Refs →

nsxivf478385

Corrected i_alternate, fixes issue #171

Author
Bert Münnich
Date
2014-08-29 20:16 +0200
Parent
0f6cb93
Commit
f478385d5997f7c2cd4392a4a20d69c3b57aeabb

+6 −4

2 files changed

  1. M Makefile +1 −1
  2. M main.c +5 −3
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20140820
1+VERSION = git-20140829
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M main.c View
@@ -314,14 +314,16 @@ end:
314314
315315 void load_image(int new)
316316 {
317+ static int current;
318+
317319 if (new < 0 || new >= filecnt)
318320 return;
319321
320322 win_set_cursor(&win, CURSOR_WATCH);
321323 reset_timeout(slideshow);
322324
323− if (new != fileidx)
324− alternate = fileidx;
325+ if (new != current)
326+ alternate = current;
325327
326328 img_close(&img, false);
327329 while (!img_load(&img, &files[new])) {
@@ -332,7 +334,7 @@ void load_image(int new)
332334 new--;
333335 }
334336 files[new].loaded = true;
335− fileidx = new;
337+ fileidx = current = new;
336338
337339 info.open = false;
338340 open_info();