]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image_png.c
fix writing using libpng15
[xonotic/darkplaces.git] / image_png.c
index f71dfdea71eedd45a5597e458cbd403848e87c25..f8d50151b7e98a2f1e8d027528cd5564a42924a7 100644 (file)
@@ -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)