fix deprecation with libpng 1.4
This commit is contained in:
parent
4b64a713a0
commit
7bd87de737
|
|
@ -177,10 +177,9 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in
|
||||||
pb.size = size;
|
pb.size = size;
|
||||||
pb.offset = 0;
|
pb.offset = 0;
|
||||||
png_set_read_fn( png, &pb, PNGReadData );
|
png_set_read_fn( png, &pb, PNGReadData );
|
||||||
png->io_ptr = &pb; /* hack! */
|
|
||||||
|
|
||||||
/* set error longjmp */
|
/* set error longjmp */
|
||||||
if( setjmp( png->jmpbuf ) )
|
if( setjmp( png_jmpbuf(png) ) )
|
||||||
{
|
{
|
||||||
Sys_Printf( "WARNING: An error occurred reading PNG image\n" );
|
Sys_Printf( "WARNING: An error occurred reading PNG image\n" );
|
||||||
png_destroy_read_struct( &png, &info, &end );
|
png_destroy_read_struct( &png, &info, &end );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user