Corrected i_alternate, fixes issue #171
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
VERSION = git-20140820
 | 
					VERSION = git-20140829
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PREFIX    = /usr/local
 | 
					PREFIX    = /usr/local
 | 
				
			||||||
MANPREFIX = $(PREFIX)/share/man
 | 
					MANPREFIX = $(PREFIX)/share/man
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								main.c
									
									
									
									
									
								
							@@ -314,14 +314,16 @@ end:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void load_image(int new)
 | 
					void load_image(int new)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						static int current;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (new < 0 || new >= filecnt)
 | 
						if (new < 0 || new >= filecnt)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	win_set_cursor(&win, CURSOR_WATCH);
 | 
						win_set_cursor(&win, CURSOR_WATCH);
 | 
				
			||||||
	reset_timeout(slideshow);
 | 
						reset_timeout(slideshow);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (new != fileidx)
 | 
						if (new != current)
 | 
				
			||||||
		alternate = fileidx;
 | 
							alternate = current;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	img_close(&img, false);
 | 
						img_close(&img, false);
 | 
				
			||||||
	while (!img_load(&img, &files[new])) {
 | 
						while (!img_load(&img, &files[new])) {
 | 
				
			||||||
@@ -332,7 +334,7 @@ void load_image(int new)
 | 
				
			|||||||
			new--;
 | 
								new--;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	files[new].loaded = true;
 | 
						files[new].loaded = true;
 | 
				
			||||||
	fileidx = new;
 | 
						fileidx = current = new;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	info.open = false;
 | 
						info.open = false;
 | 
				
			||||||
	open_info();
 | 
						open_info();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user