]> git.pld-linux.org Git - packages/corona.git/blame - giflib5.patch
- release 12 (rebuild without libgif.la)
[packages/corona.git] / giflib5.patch
CommitLineData
b173f259
JR
1--- corona-1.0.2/src/OpenGIF.cpp.orig 2015-06-22 20:57:06.941970178 +0200
2+++ corona-1.0.2/src/OpenGIF.cpp 2015-06-22 20:58:51.143707746 +0200
3@@ -20,7 +20,11 @@
4 COR_GUARD("OpenGIF");
5
6 // open GIF file
7+#if GIFLIB_MAJOR >= 5
8+ GifFileType* gif = DGifOpen(file, InputFunc, NULL);
9+#else
10 GifFileType* gif = DGifOpen(file, InputFunc);
11+#endif
12 if (!gif) {
13 COR_LOG("DGifOpen failed");
14 return 0;
15@@ -29,7 +33,11 @@
16 // read GIF image
17 if (DGifSlurp(gif) != GIF_OK) {
18 COR_LOG("DGifSlurp failed");
19+#if GIFLIB_MAJOR >= 5
20+ DGifCloseFile(gif, NULL);
21+#else
22 DGifCloseFile(gif);
23+#endif
24 return 0;
25 }
26 ColorMapObject* cmap = gif->SColorMap;
27@@ -50,7 +58,11 @@
28 COR_LOG(str);
29 }
30
31+#if GIFLIB_MAJOR >= 5
32+ DGifCloseFile(gif, NULL);
33+#else
34 DGifCloseFile(gif);
35+#endif
36 return 0;
37 }
38
39@@ -117,7 +129,11 @@
40 memcpy(out, in, width * height);
41 }
42
43+#if GIFLIB_MAJOR >= 5
44+ DGifCloseFile(gif, NULL);
45+#else
46 DGifCloseFile(gif);
47+#endif
48 return new SimpleImage(width, height, PF_I8, image.release(),
49 (byte*)palette.release(), 256, PF_R8G8B8A8);
50 }
This page took 0.063999 seconds and 4 git commands to generate.