summaryrefslogtreecommitdiff
blob: 46f13a0fbc84dc04bd114a2b6248838a07017397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
http://openmsx.svn.sourceforge.net/viewvc/openmsx/openmsx/trunk/src/video/PNG.cc?r1=11609&r2=12214

--- src/video/PNG.cc
+++ src/video/PNG.cc
@@ -167,7 +167,7 @@
 				"Attempted to create a surface with excessive height: "
 				<< height << ", max " << MAX_SIZE);
 		}
-		int bpp = png.info->channels * 8;
+		int bpp = png_get_channels(png.ptr, png.info) * 8;
 		assert(bpp == 24 || bpp == 32);
 		Uint32 redMask, grnMask, bluMask, alpMask;
 		if (OPENMSX_BIGENDIAN) {