mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Add log for when file loading fails
This commit is contained in:
parent
58af552945
commit
f382aceb28
@ -812,7 +812,10 @@ bool rpng_load_image_argb(const char *path, uint32_t **data,
|
||||
FILE *file = fopen(path, "rb");
|
||||
|
||||
if (!file)
|
||||
{
|
||||
fprintf(stderr, "Tried to open file: %s\n", path);
|
||||
GOTO_END_ERROR();
|
||||
}
|
||||
|
||||
if (!rpng_load_image_argb_init(file, path,
|
||||
data, width, height, &file_len))
|
||||
@ -829,14 +832,15 @@ bool rpng_load_image_argb(const char *path, uint32_t **data,
|
||||
&has_ihdr, &has_idat, &has_iend, &has_plte,
|
||||
&increment);
|
||||
|
||||
if (!ret)
|
||||
GOTO_END_ERROR();
|
||||
|
||||
if (increment != 0)
|
||||
{
|
||||
if (fseek(file, increment, SEEK_CUR) < 0)
|
||||
GOTO_END_ERROR();
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
GOTO_END_ERROR();
|
||||
}
|
||||
|
||||
if (!has_ihdr || !has_idat || !has_iend)
|
||||
|
Loading…
x
Reference in New Issue
Block a user