Skip to content

Commit

Permalink
png_const_colorp isn't used in SDL_image-1.2.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Oct 16, 2018
1 parent 3cf8598 commit dad4dfb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions IMG_png.c
Expand Up @@ -75,7 +75,6 @@
#if (PNG_LIBPNG_VER_MINOR < 5)
#define LIBPNG_VERSION_12
typedef png_bytep png_const_bytep;
typedef png_color *png_const_colorp;
#endif
#if (PNG_LIBPNG_VER_MINOR < 6)
typedef png_structp png_const_structrp;
Expand Down Expand Up @@ -542,7 +541,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
palette->colors[i].b = (Uint8)i;
}
} else if (png_num_palette > 0 ) {
palette->ncolors = png_num_palette;
palette->ncolors = png_num_palette;
for( i=0; i<png_num_palette; ++i ) {
palette->colors[i].b = png_palette[i].blue;
palette->colors[i].g = png_palette[i].green;
Expand Down

0 comments on commit dad4dfb

Please sign in to comment.