mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 13:25:28 +00:00
Don't take the test code so literally.
This commit is contained in:
parent
8da734c921
commit
810aa8a5ed
@ -59,26 +59,12 @@ bool texture_image_load(struct texture_image *out_img, const char *path)
|
||||
|
||||
ptr = nbio_get_ptr(read, &len);
|
||||
|
||||
if (len != 1024*1024)
|
||||
RARCH_ERR("ERROR: wrong size (2).\n");
|
||||
if (ptr)
|
||||
RARCH_WARN("Read pointer is available before iterating?\n");
|
||||
|
||||
nbio_begin_read(read);
|
||||
|
||||
while (!nbio_iterate(read))
|
||||
looped=true;
|
||||
|
||||
if (!looped)
|
||||
RARCH_LOG("Read finished immediately?\n");
|
||||
while (!nbio_iterate(read)) {}
|
||||
|
||||
ptr = nbio_get_ptr(read, &len);
|
||||
|
||||
if (len != 1024*1024)
|
||||
puts("ERROR: wrong size (3)");
|
||||
if (*(char*)ptr != 0x42 || memcmp(ptr, (char*)ptr+1, 1024*1024-1))
|
||||
puts("ERROR: wrong data");
|
||||
|
||||
if (!png_decode(ptr, len, &img, FMT_ARGB8888))
|
||||
goto error;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user