mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
Don't take in as first argument rpng->buff_data - handle this internally
This commit is contained in:
parent
cd79143038
commit
d5837f4b7c
@ -98,10 +98,11 @@ static bool png_read_plte_into_buf(uint8_t *buf,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rpng_nbio_load_image_argb_iterate(uint8_t *buf, struct rpng_t *rpng)
|
bool rpng_nbio_load_image_argb_iterate(struct rpng_t *rpng)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
unsigned ret;
|
unsigned ret;
|
||||||
|
uint8_t *buf = (uint8_t*)rpng->buff_data;
|
||||||
|
|
||||||
struct png_chunk chunk = {0};
|
struct png_chunk chunk = {0};
|
||||||
|
|
||||||
|
@ -87,8 +87,7 @@ static bool rpng_nbio_load_image_argb(const char *path, uint32_t **data,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (rpng_nbio_load_image_argb_iterate(
|
while (rpng_nbio_load_image_argb_iterate(rpng));
|
||||||
rpng->buff_data, rpng));
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
fprintf(stderr, "has_ihdr: %d\n", rpng->has_ihdr);
|
fprintf(stderr, "has_ihdr: %d\n", rpng->has_ihdr);
|
||||||
|
@ -109,8 +109,7 @@ bool rpng_is_valid(struct rpng_t *rpng);
|
|||||||
|
|
||||||
void rpng_nbio_load_image_free(struct rpng_t *rpng);
|
void rpng_nbio_load_image_free(struct rpng_t *rpng);
|
||||||
|
|
||||||
bool rpng_nbio_load_image_argb_iterate(uint8_t *buf,
|
bool rpng_nbio_load_image_argb_iterate(struct rpng_t *rpng);
|
||||||
struct rpng_t *rpng);
|
|
||||||
|
|
||||||
int rpng_nbio_load_image_argb_process(struct rpng_t *rpng,
|
int rpng_nbio_load_image_argb_process(struct rpng_t *rpng,
|
||||||
uint32_t **data, unsigned *width, unsigned *height);
|
uint32_t **data, unsigned *width, unsigned *height);
|
||||||
|
@ -263,9 +263,7 @@ static int rarch_main_data_image_iterate_transfer(nbio_handle_t *nbio)
|
|||||||
|
|
||||||
for (i = 0; i < nbio->image.pos_increment; i++)
|
for (i = 0; i < nbio->image.pos_increment; i++)
|
||||||
{
|
{
|
||||||
if (!rpng_nbio_load_image_argb_iterate(
|
if (!rpng_nbio_load_image_argb_iterate(nbio->image.handle))
|
||||||
nbio->image.handle->buff_data,
|
|
||||||
nbio->image.handle))
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user