mirror of https://github.com/mgba-emu/mgba.git
Util: Fix build on ancient versions of libpng
This commit is contained in:
parent
4db6a13ea4
commit
664a46c5a9
|
@ -53,7 +53,7 @@ bool PNGWritePixels(png_structp png, unsigned width, unsigned height, unsigned s
|
|||
if (!row) {
|
||||
return false;
|
||||
}
|
||||
png_const_bytep pixelData = pixels;
|
||||
const png_byte* pixelData = pixels;
|
||||
if (setjmp(png_jmpbuf(png))) {
|
||||
free(row);
|
||||
return false;
|
||||
|
@ -81,7 +81,7 @@ bool PNGWriteCustomChunk(png_structp png, const char* name, size_t size, void* d
|
|||
if (setjmp(png_jmpbuf(png))) {
|
||||
return false;
|
||||
}
|
||||
png_write_chunk(png, (png_const_bytep) realName, data, size);
|
||||
png_write_chunk(png, (png_bytep) realName, data, size);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ bool PNGInstallChunkHandler(png_structp png, void* context, ChunkHandler handler
|
|||
return false;
|
||||
}
|
||||
png_set_read_user_chunk_fn(png, context, handler);
|
||||
png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_const_bytep) chunkName, 1);
|
||||
png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_bytep) chunkName, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue