mirror of
https://github.com/libretro/RetroArch
synced 2025-02-17 15:41:01 +00:00
Create rpng_is_valid
This commit is contained in:
parent
09aac8a320
commit
3762502112
@ -160,7 +160,7 @@ bool rpng_load_image_argb_iterate(FILE **fd, struct rpng_t *rpng)
|
||||
return false;
|
||||
|
||||
case PNG_CHUNK_IHDR:
|
||||
if (rpng->has_ihdr || rpng->has_idat || rpng->has_iend)
|
||||
if (rpng_is_valid(rpng))
|
||||
return false;
|
||||
|
||||
if (!png_parse_ihdr_fio(fd, &chunk, &rpng->ihdr))
|
||||
|
@ -249,7 +249,7 @@ bool rpng_nbio_load_image_argb_start(struct rpng_t *rpng)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool rpng_nbio_is_valid(struct rpng_t *rpng)
|
||||
bool rpng_is_valid(struct rpng_t *rpng)
|
||||
{
|
||||
if (rpng->has_ihdr)
|
||||
return true;
|
||||
|
@ -105,7 +105,7 @@ bool rpng_load_image_argb(const char *path, uint32_t **data,
|
||||
|
||||
struct rpng_t *rpng_nbio_load_image_argb_init(const char *path);
|
||||
|
||||
bool rpng_nbio_is_valid(struct rpng_t *rpng);
|
||||
bool rpng_is_valid(struct rpng_t *rpng);
|
||||
|
||||
void rpng_nbio_load_image_free(struct rpng_t *rpng);
|
||||
|
||||
|
@ -185,7 +185,7 @@ static int cb_image_menu_generic(nbio_handle_t *nbio)
|
||||
if (!nbio)
|
||||
return -1;
|
||||
|
||||
if (!rpng_nbio_is_valid(nbio->image.handle))
|
||||
if (!rpng_is_valid(nbio->image.handle))
|
||||
return -1;
|
||||
|
||||
retval = rpng_nbio_load_image_argb_process(nbio->image.handle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user