summaryrefslogtreecommitdiff
path: root/community-testing/performous/png15.patch
blob: b6fb8fb1411877cdc60d9dfa5b77524b0aab8da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff -ur Performous-0.6.1-Source/cmake/Modules/FindPng.cmake Performous-0.6.1a-Source/cmake/Modules/FindPng.cmake
--- Performous-0.6.1-Source/cmake/Modules/FindPng.cmake	2010-10-31 17:05:44.000000000 +0100
+++ Performous-0.6.1a-Source/cmake/Modules/FindPng.cmake	2012-01-29 01:07:56.339648832 +0100
@@ -10,7 +10,7 @@
 
 include(LibFindMacros)
 
-libfind_pkg_check_modules(Png_PKGCONF Png)
+libfind_pkg_check_modules(Png_PKGCONF libpng)
 
 find_path(Png_INCLUDE_DIR
   NAMES pngconf.h
@@ -18,7 +18,7 @@
 )
 
 find_library(Png_LIBRARY
-  NAMES png png12 png14
+  NAMES png png12 png14 png15
   PATHS ${Png_PKGCONF_LIBRARY_DIRS}
 )
 
diff -ur Performous-0.6.1-Source/game/image.hh Performous-0.6.1a-Source/game/image.hh
--- Performous-0.6.1-Source/game/image.hh	2010-10-31 17:05:43.000000000 +0100
+++ Performous-0.6.1a-Source/game/image.hh	2012-01-29 01:44:16.050575186 +0100
@@ -26,7 +26,7 @@
 	}
 	void loadPNG_internal(png_structp pngPtr, png_infop infoPtr, std::ifstream& file, std::vector<unsigned char>& image, std::vector<png_bytep>& rows, unsigned& w, unsigned& h) {
 		if (setjmp(png_jmpbuf(pngPtr))) throw std::runtime_error("Reading PNG failed");
-		png_set_read_fn(pngPtr,(voidp)&file, readPngHelper);
+		png_set_read_fn(pngPtr, &file, readPngHelper);
 		png_read_info(pngPtr, infoPtr);
 		png_set_expand(pngPtr);  // Expand everything to RGB(A)
 		png_set_strip_16(pngPtr);  // Strip everything down to 8 bit/component