X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=image_png.c;h=4267331be738462ceaacfd07541f5bedab60861a;hb=7a337842c58f37323aac830808832c79c659f57e;hp=ed5ed62340593b73534accec5ca117275ac6e3e6;hpb=dfc9e3da3f792ba8ecad930440829422500bc62d;p=xonotic%2Fdarkplaces.git diff --git a/image_png.c b/image_png.c index ed5ed623..4267331b 100644 --- a/image_png.c +++ b/image_png.c @@ -126,10 +126,11 @@ qboolean PNG_OpenLibrary (void) const char* dllnames [] = { #if WIN32 + "libpng14-14.dll", "libpng14.dll", "libpng12.dll", #elif defined(MACOSX) - "libpng14.0.dylib", + "libpng14.14.dylib", "libpng12.0.dylib", #else "libpng14.so.14", // WTF libtool guidelines anyone? @@ -255,7 +256,7 @@ void PNG_warning_fn(void *png, const char *message) extern int image_width; extern int image_height; -unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize) +unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int *miplevel) { unsigned int c; unsigned int y; @@ -285,7 +286,9 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize) // NOTE: this relies on jmp_buf being the first thing in the png structure // created by libpng! (this is correct for libpng 1.2.x) #ifdef __cplusplus -#if defined(MACOSX) || defined(WIN32) +#ifdef WIN64 + if (setjmp((_JBTYPE *)png)) +#elif defined(MACOSX) || defined(WIN32) if (setjmp((int *)png)) #else if (setjmp((__jmp_buf_tag *)png)) @@ -478,7 +481,9 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, // NOTE: this relies on jmp_buf being the first thing in the png structure // created by libpng! (this is correct for libpng 1.2.x) #ifdef __cplusplus -#if defined(MACOSX) || defined(WIN32) +#ifdef WIN64 + if (setjmp((_JBTYPE *)png)) +#elif defined(MACOSX) || defined(WIN32) if (setjmp((int *)png)) #else if (setjmp((__jmp_buf_tag *)png))