Skip to content

Commit

Permalink
Fixed libpng version check
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 8, 2011
1 parent 94c327a commit 574562b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IMG_png.c
Expand Up @@ -72,7 +72,7 @@
#include <png.h>

/* Check for the older version of libpng */
#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR)
#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR < 4)
#define LIBPNG_VERSION_12
#endif

Expand Down Expand Up @@ -282,6 +282,9 @@ int IMG_InitPNG()
lib.png_set_read_fn = png_set_read_fn;
lib.png_set_strip_16 = png_set_strip_16;
lib.png_sig_cmp = png_sig_cmp;
#ifndef LIBPNG_VERSION_12
lib.png_set_longjmp_fn = png_set_longjmp_fn;
#endif
}
++lib.loaded;

Expand Down

0 comments on commit 574562b

Please sign in to comment.