eed7c62887
All fixes by yours truly.
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
$OpenBSD: patch-source_Irrlicht_CImageLoaderPNG_cpp,v 1.1 2011/07/08 20:38:02 naddy Exp $
|
|
|
|
Fix build with png-1.5.
|
|
|
|
--- source/Irrlicht/CImageLoaderPNG.cpp.orig Mon Jul 4 18:44:06 2011
|
|
+++ source/Irrlicht/CImageLoaderPNG.cpp Mon Jul 4 18:49:49 2011
|
|
@@ -28,7 +28,7 @@ namespace video
|
|
static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
|
|
{
|
|
os::Printer::log("PNG FATAL ERROR", msg, ELL_ERROR);
|
|
- longjmp(png_ptr->jmpbuf, 1);
|
|
+ png_longjmp(png_ptr, 1);
|
|
}
|
|
|
|
// PNG function for file reading
|
|
@@ -37,7 +37,7 @@ void PNGAPI user_read_data_fcn(png_structp png_ptr, pn
|
|
png_size_t check;
|
|
|
|
// changed by zola {
|
|
- io::IReadFile* file=(io::IReadFile*)png_ptr->io_ptr;
|
|
+ io::IReadFile* file=(io::IReadFile*)png_get_io_ptr(png_ptr);
|
|
check=(png_size_t) file->read((void*)data,(u32)length);
|
|
// }
|
|
|
|
@@ -162,7 +162,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file
|
|
if (BitDepth < 8)
|
|
{
|
|
if (ColorType==PNG_COLOR_TYPE_GRAY || ColorType==PNG_COLOR_TYPE_GRAY_ALPHA)
|
|
- png_set_gray_1_2_4_to_8(png_ptr);
|
|
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
|
|
else
|
|
png_set_packing(png_ptr);
|
|
}
|