mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 13:25:28 +00:00
(rpng) Refactor file_increment_ptr
This commit is contained in:
parent
90214163a4
commit
67d83baa33
@ -606,13 +606,6 @@ static bool png_realloc_idat(const struct png_chunk *chunk, struct idat_buffer *
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool file_increment_ptr(FILE *file, size_t increment_size)
|
||||
{
|
||||
if (fseek(file, increment_size, SEEK_CUR) < 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool png_read_plte_into_buf(uint32_t *buffer, unsigned entries)
|
||||
{
|
||||
unsigned i;
|
||||
@ -840,7 +833,7 @@ bool rpng_load_image_argb(const char *path, uint32_t **data,
|
||||
|
||||
if (increment != 0)
|
||||
{
|
||||
if (!file_increment_ptr(file, increment))
|
||||
if (fseek(file, increment, SEEK_CUR) < 0)
|
||||
GOTO_END_ERROR();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user