]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image_png.c
patch from VorteX that makes GAME_DELUXEQUAKE mode reset a cvar in the
[xonotic/darkplaces.git] / image_png.c
index 6cf182a1e94a958f2491754940c60d1bed702ecc..b53aee42ead27d9237509a030d654daef7db4d41 100644 (file)
@@ -229,7 +229,7 @@ void PNG_warning_fn(void *png, const char *message)
 extern int     image_width;
 extern int     image_height;
 
-unsigned char *PNG_LoadImage (const unsigned char *raw, int filesize, int matchwidth, int matchheight)
+unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize)
 {
        unsigned int    y;
        void *png, *pnginfo;
@@ -311,11 +311,6 @@ unsigned char *PNG_LoadImage (const unsigned char *raw, int filesize, int matchw
        }
 #endif
 
-       if ((matchwidth && my_png.Width != (unsigned long)matchwidth) || (matchheight && my_png.Height != (unsigned long)matchheight))
-       {
-               qpng_destroy_read_struct(&png, &pnginfo, 0);
-               return NULL;
-       }
        if (my_png.ColorType == PNG_COLOR_TYPE_PALETTE)
                qpng_set_palette_to_rgb(png);
        if (my_png.ColorType == PNG_COLOR_TYPE_GRAY || my_png.ColorType == PNG_COLOR_TYPE_GRAY_ALPHA)