From: divverent Date: Thu, 19 Apr 2012 08:06:50 +0000 (+0000) Subject: fix writing using libpng15 X-Git-Tag: xonotic-v0.7.0~156 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5d6121ffc2593b601b15a790ac94b2c246d585e4;p=xonotic%2Fdarkplaces.git fix writing using libpng15 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11797 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=bdda65ec4ede57a1d8d52219d63687595d57328a --- diff --git a/image_png.c b/image_png.c index f71dfdea..f8d50151 100644 --- a/image_png.c +++ b/image_png.c @@ -487,7 +487,9 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, } png = (void *)qpng_create_write_struct( - (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : PNG_LIBPNG_VER_STRING_14, // nasty hack to support both libpng12 and libpng14 + (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : + (qpng_access_version_number() / 100 == 104) ? PNG_LIBPNG_VER_STRING_14 : + PNG_LIBPNG_VER_STRING_15, // nasty hack... whatever 0, PNG_error_fn, PNG_warning_fn ); if(!png)