nsxivf478385
Corrected i_alternate, fixes issue #171
+6 −4
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20140820 | |
| 1 | + | VERSION = git-20140829 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -314,14 +314,16 @@ end: | |||
| 314 | 314 | ||
| 315 | 315 | void load_image(int new) | |
| 316 | 316 | { | |
| 317 | + | static int current; | |
| 318 | + | ||
| 317 | 319 | if (new < 0 || new >= filecnt) | |
| 318 | 320 | return; | |
| 319 | 321 | ||
| 320 | 322 | win_set_cursor(&win, CURSOR_WATCH); | |
| 321 | 323 | reset_timeout(slideshow); | |
| 322 | 324 | ||
| 323 | − | if (new != fileidx) | |
| 324 | − | alternate = fileidx; | |
| 325 | + | if (new != current) | |
| 326 | + | alternate = current; | |
| 325 | 327 | ||
| 326 | 328 | img_close(&img, false); | |
| 327 | 329 | while (!img_load(&img, &files[new])) { | |
| @@ -332,7 +334,7 @@ void load_image(int new) | |||
| 332 | 334 | new--; | |
| 333 | 335 | } | |
| 334 | 336 | files[new].loaded = true; | |
| 335 | − | fileidx = new; | |
| 337 | + | fileidx = current = new; | |
| 336 | 338 | ||
| 337 | 339 | info.open = false; | |
| 338 | 340 | open_info(); | |