mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	fix texture dumping on opengl es, create load folder if none exists if custom textures is enabled
This commit is contained in:
		
							parent
							
								
									254f8a4643
								
							
						
					
					
						commit
						f09489475a
					
				
					 2 changed files with 9 additions and 43 deletions
				
			
		|  | @ -922,7 +922,11 @@ void CachedSurface::DumpTexture(GLuint target_tex, const std::string& dump_path) | |||
|     std::vector<u8> decoded_texture; | ||||
|     decoded_texture.resize(width * height * 4); | ||||
|     glBindTexture(GL_TEXTURE_2D, target_tex); | ||||
|     glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, &decoded_texture[0]); | ||||
|     if (GLES) | ||||
|         GetTexImageOES(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, height, width, 0, | ||||
|                        &decoded_texture[0]); | ||||
|     else | ||||
|         glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, &decoded_texture[0]); | ||||
|     glBindTexture(GL_TEXTURE_2D, 0); | ||||
|     Common::FlipRGBA8Texture(decoded_texture, width, height); | ||||
|     if (!image_interface->EncodePNG(dump_path, decoded_texture, width, height)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue