Bitmap: Fix getPixel calls not using cached surface
This commit is contained in:
		
							parent
							
								
									e156421b3b
								
							
						
					
					
						commit
						d71919c2c3
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -914,7 +914,8 @@ Color Bitmap::getPixel(int x, int y) const
 | 
				
			||||||
	if (x < 0 || y < 0 || x >= width() || y >= height())
 | 
						if (x < 0 || y < 0 || x >= width() || y >= height())
 | 
				
			||||||
		return Vec4();
 | 
							return Vec4();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p->downloadToSurface();
 | 
						if (!p->surface)
 | 
				
			||||||
 | 
							p->downloadToSurface();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	uint32_t pixel = getPixelAt(p->surface, p->format, x, y);
 | 
						uint32_t pixel = getPixelAt(p->surface, p->format, x, y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue