remove unneeded libpng version checks

This commit is contained in:
Stefan Seyfried
2013-05-01 16:37:58 +02:00
parent e92afd2b42
commit 23ec489390
3 changed files with 0 additions and 16 deletions

View File

@@ -50,11 +50,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int
fclose(fh); fclose(fh);
return(FH_ERROR_FORMAT); return(FH_ERROR_FORMAT);
} }
#if (PNG_LIBPNG_VER < 10500)
if (setjmp(png_ptr->jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr))) if (setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fh); fclose(fh);
@@ -158,11 +154,7 @@ int fh_png_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*w
return(FH_ERROR_FORMAT); return(FH_ERROR_FORMAT);
} }
#if (PNG_LIBPNG_VER < 10500)
if (setjmp(png_ptr->jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr))) if (setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fh); fclose(fh);

View File

@@ -194,11 +194,7 @@ bool CScreenShot::SavePng()
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, (png_error_ptr)NULL, (png_error_ptr)NULL); png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, (png_error_ptr)NULL, (png_error_ptr)NULL);
info_ptr = png_create_info_struct(png_ptr); info_ptr = png_create_info_struct(png_ptr);
#if (PNG_LIBPNG_VER < 10500)
if (setjmp(png_ptr->jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr))) if (setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
printf("CScreenShot::SavePng: %s save error\n", filename.c_str()); printf("CScreenShot::SavePng: %s save error\n", filename.c_str());
png_destroy_write_struct(&png_ptr, &info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr);

View File

@@ -457,11 +457,7 @@ bool CLCDDisplay::load_png(const char * const filename)
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
else else
{ {
#if (PNG_LIBPNG_VER < 10500)
if (!(setjmp(png_ptr->jmpbuf)))
#else
if (!setjmp(png_jmpbuf(png_ptr))) if (!setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
png_init_io(png_ptr,fh); png_init_io(png_ptr,fh);